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

Allow setting a message key for the Kafka binder #51

Closed
sabbyanandan opened this issue Sep 27, 2016 · 5 comments
Closed

Allow setting a message key for the Kafka binder #51

sabbyanandan opened this issue Sep 27, 2016 · 5 comments
Assignees
Milestone

Comments

@sabbyanandan
Copy link
Contributor

From @Jacuo on July 28, 2016 14:55

Sending message to kafka topic, when cleanup.policy=compact causes error. It looks that problem is with key= null. I tried to set key using

MessageBuilder.withPayload(message)
                            .setHeader(KafkaHeaders.MESSAGE_KEY, key)

but with no effect.
Is there any way to set key value ?

Copied from original issue: spring-cloud/spring-cloud-stream#602

@sabbyanandan
Copy link
Contributor Author

From @mbogoevici on July 28, 2016 15:21

Hi,

Thanks for pointing that out. We are currently mistakingly setting the key to null always, which is not working with compacted topics.

@sabbyanandan
Copy link
Contributor Author

From @Jacuo on August 17, 2016 7:57

Is there any prediction, when it will be fixed ?

@sabbyanandan
Copy link
Contributor Author

@Jacuo: Could you please upgrade to Brooklyn.RELEASE and retry?

@ilayaperumalg
Copy link
Contributor

Hi @Jacuo I am able to send/receive messages with key/value set with appropriate serializer/de-serializer configs. Please re-open this ticket if you still see any issue. Thanks!

@minhtran-q
Copy link

minhtran-q commented May 12, 2021

Hi @ilayaperumalg,
Can you illustrate a sample serializer/de-serializer configuration ?
Thanks

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

No branches or pull requests

3 participants