Posts

Showing posts with the label jedis

ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context

Image
Clash Royale CLAN TAG #URR8PPP ERR only (P)SUBSCRIBE / (P)UNSUBSCRIBE / PING / QUIT allowed in this context I am using jdish.publish in my web app and jedis.subscribe in my desktop app. so both are separate app. jdish.publish jedis.subscribe I have this pubsub class public class RedisNewPostListener extends JedisPubSub { private final Jedis jedis; private final AppInstances appInstances; public RedisNewPostListener(AppInstances instances, Jedis jedis) { this.jedis = jedis; appInstances = instances; } @Override public void onMessage(String channel, String message) { String pos = message.split("##"); double lat = Double.parseDouble(pos[0]); double lon = Double.parseDouble(pos[1]); List<GeoRadiusResponse> members = jedis.georadius("UsersByLocation", lon, lat, GEO_SEARCH_RANGE, GeoUnit.KM); i am calling it like RedisNewPostListener postListener = new RedisNewPostListener(instances, jedis); j...