Revert "convertAndSend returns the nr of targeted channels"
- DATAREDIS-118 - Change method return type back to void to fix backwards compatibility issues - Modify tests to assert specific clients receive or don't receive messages vs comparing expected client counts
This commit is contained in:
@@ -117,7 +117,7 @@ public interface RedisOperations<K, V> {
|
||||
List<Object> exec();
|
||||
|
||||
// pubsub functionality on the template
|
||||
Long convertAndSend(String destination, Object message);
|
||||
void convertAndSend(String destination, Object message);
|
||||
|
||||
|
||||
// operation types
|
||||
|
||||
@@ -496,16 +496,17 @@ public class RedisTemplate<K, V> extends RedisAccessor implements RedisOperation
|
||||
}
|
||||
|
||||
|
||||
public Long convertAndSend(String channel, Object message) {
|
||||
public void convertAndSend(String channel, Object message) {
|
||||
Assert.hasText(channel, "a non-empty channel is required");
|
||||
|
||||
final byte[] rawChannel = rawString(channel);
|
||||
final byte[] rawMessage = rawValue(message);
|
||||
|
||||
return execute(new RedisCallback<Long>() {
|
||||
execute(new RedisCallback<Object>() {
|
||||
|
||||
public Long doInRedis(RedisConnection connection) {
|
||||
return connection.publish(rawChannel, rawMessage);
|
||||
public Object doInRedis(RedisConnection connection) {
|
||||
connection.publish(rawChannel, rawMessage);
|
||||
return null;
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user