You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a client is subscribed and the server is bounced, no attempt is made to resubscribe the client (and of course no Exception is thrown since the thread does not block on the subscribe call).
This can be reproduced by running the following test, putting a breakpoint on creation of client3 and bouncing the Redis server before continuing. "World" is not printed out.
@Test
public void testSubscribe() throws IOException {
RedisClient client = new RedisClient("localhost", 6379);
client.addListener(new SrpListener());
client.subscribe("channel1".getBytes());
RedisClient client2 = new RedisClient("localhost", 6379);
client2.publish("channel1".getBytes(), "Hello".getBytes());
RedisClient client3 = new RedisClient("localhost", 6379);
client3.publish("channel1".getBytes(), "World".getBytes());
}
private class SrpListener implements ReplyListener {
public void subscribed(byte[] name, int channels) {
}
public void psubscribed(byte[] name, int channels) {
}
public void unsubscribed(byte[] name, int channels) {
}
public void punsubscribed(byte[] name, int channels) {
}
public void message(byte[] channel, byte[] message) {
System.out.println(new String(message));
}
public void pmessage(byte[] pattern, byte[] channel, byte[] message) {
}
}
The text was updated successfully, but these errors were encountered:
If a client is subscribed and the server is bounced, no attempt is made to resubscribe the client (and of course no Exception is thrown since the thread does not block on the subscribe call).
This can be reproduced by running the following test, putting a breakpoint on creation of client3 and bouncing the Redis server before continuing. "World" is not printed out.
The text was updated successfully, but these errors were encountered: