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

Serializer / Deserializer is not working for Long #9

Open
Sdaas opened this issue May 21, 2022 · 0 comments
Open

Serializer / Deserializer is not working for Long #9

Sdaas opened this issue May 21, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Sdaas
Copy link
Owner

Sdaas commented May 21, 2022

example. feature

Scenario: Using Long data type in the Value

# Create producer with long serializer
* def producerProps = KafkaProducer.getDefaultProperties()
* producerProps["value.serializer"] = "org.apache.kafka.common.serialization.LongSerializer"
* def kp = new KafkaProducer(producerProps)
# Create consumer with long deserializer
* def consumerProps = KafkaConsumer.getDefaultProperties()
* consumerProps["value.deserializer"] = "org.apache.kafka.common.serialization.LongDeserializer"
* def kc = new KafkaConsumer(topic,consumerProps)
# Note you need to promote 12345 into an Object first ...
* def value = new java.lang.Long(12345)
* kp.send(topic, "message_key", value)
* json out = kc.take()
* kc.close()
* kp.close()
# Do the matching
* match out == { key : '#notnull', value : 12345 }
* match out.value == 12345
@Sdaas Sdaas added the bug Something isn't working label May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant