-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Provide a way to create an OffsetAndMetdata with metadata when using Spring-Kafka #2170
Milestone
Comments
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 23, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 23, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 23, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 23, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 23, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 23, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 24, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 24, 2022
frosiere
added a commit
to frosiere/spring-kafka
that referenced
this issue
Mar 30, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #2169
Originally posted by frosiere March 15, 2022
In some specific cases, it may make sense to set/customize the metadata field of the OffsetAndMetadata object with data coming from the consumer. When using Spring Kafka, it's impossible as this object is created internally in KafkaMessageListenerContainer.ListenerConsumer.
Due to this, a callback can be set on the container properties but the metadata will always be empty when calling the onComplete method of the callback.
This may help having a mechanism to set these metadata.
So, the proposal would be to either review the way to set a callback or to simply have an OffsetAndMetadataProvider as follow
This provider would then be set on the container properties as show in the following portion of code
Internally, Spring Kafka would need to be slightly reworked to use the following kind of method instead of directly creating the OffsetAndMetadata object.
Any other way to set metadata is more than welcome.
If we agree on the need, I can contribute on the implementation. This one or another one.
Thanks for your reply.
The text was updated successfully, but these errors were encountered: