pulsar4s
pulsar4s copied to clipboard
producer.send does not strip ""
Example code
val client = PulsarClient("pulsar://localhost:6650")
val producer_topic = Topic("test")
val producer = client.producer[String](ProducerConfig(producer_topic))
producer.send("Hello,World,1")
When sending this as a String and receiving a Array[Byte] pulsar4s does not strip the "" within the producer.send function
What do you mean by “does not strip the ""?” What's supposed to be inside the ""? :thinking:
Hi Judu. When the producer sends this message, the consumer receives the string "Hello,World,1"
which includes the "
on each side. By using Pulsar Java (without pulsar4s) this doesnt happen and the consumer receives Hello,World,1
only
Maybe that's when you're sending JSON? If you're serializing as a regular string I'd expect the string to be received exactly as sent.
Can you provide an example of the code you expect to be equivalent in the Java and pulsar4s APIs?