Skip to content

Binary Data Support? #13

Open
Open
@luhan

Description

@luhan
  1. Binary data is not supported in pub/sub mode.

  2. 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);

  1. 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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions