Open
Description
-
Binary data is not supported in pub/sub mode.
-
test code:
SortedSetOperations not sorted #2.1 Subscriber (scala)val client = new RedisClient("localhost", 6379)
client.subscribe("hello")((msg: PubSubMessage) => {
println("rcv from channel:", msg)msg match{
case m:M => {
println("rcv", m.message)
dumpBytes(m.message.getBytes("iso-8859-1"))
}
case _ => {println("Unknown...")}
}
})
2.2 Publisher (by jedis)
byte[] data = {0x01,0x02,(byte) 0xff};
Jedis jedis = new Jedis("localhost");
jedis.publish("hello".getBytes(), data);
- test result:
(rcv from channel:,S(hello,1))
Unknown...
(rcv from channel:,M(hello,���))
(rcv,���)
0000 01 02 3f ..?
^^^^----> 0xff has been cast to 0x3f
Is there anyone who can give me a suggestion?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels