Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

producer.send does not strip "" #374

Open
Haaroon opened this issue Dec 13, 2021 · 3 comments
Open

producer.send does not strip "" #374

Haaroon opened this issue Dec 13, 2021 · 3 comments

Comments

@Haaroon
Copy link

Haaroon commented Dec 13, 2021

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

@judu
Copy link
Member

judu commented Dec 16, 2021

What do you mean by “does not strip the ""?” What's supposed to be inside the ""? 🤔

@Haaroon
Copy link
Author

Haaroon commented Dec 16, 2021

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

@gmethvin
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants