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

Cannot handle multiple group-ids with same topic when @KafkaListener on method level #278

Closed
setarator opened this issue Jul 7, 2023 · 4 comments
Labels
bug Something isn't working staged for release

Comments

@setarator
Copy link

Describe the bug
When there are multiple consumers consuming the same topic with different group-id annotated with @KafkaListener on method level, MethodLevelKafkaListenerScanner throws an exception while scanning due to duplicate key of topics. This issue looks like the same as previously fixed #85

Dependencies and versions used
springwolf-kafka version 0.11.0.

Stack trace and error logs
2023-07-06T11:41:08.970Z ERROR 1 --- [ main] i.g.s.s.asyncapi.DefaultChannelsService : An error was encountered during channel scanning with io.github.stavshamir.springwolf.asyncapi.scanners.channels.annotation.MethodLevelKafkaListenerScanner@7a247711: Duplicate key example.topic ...

Above error is thrown here https://github.com/springwolf/springwolf-core/blob/master/springwolf-core/src/main/java/io/github/stavshamir/springwolf/asyncapi/scanners/channels/annotation/AbstractMethodLevelListenerScanner.java#L44

@setarator setarator added the bug Something isn't working label Jul 7, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Welcome to Springwolf. Thanks a lot for reporting your first issue. Please check out our contributors guide and feel free to join us on discord.

timonback added a commit to timonback/springwolf-core that referenced this issue Jul 14, 2023
@timonback
Copy link
Member

Thank you @setarator for the report.

Springwolf support for multiple servers/listeners with the exact same topic + payload is currently limited, but it is one of the things we are working on.

The linked PR resolves the exception #289, however only one group-id will be documented - not both.

You or anyone else is welcome to improve and contribute an improved logic to run the ChannelMerge earlier and take care of merging protocol specific attributes (i.e. group-id)

@timonback
Copy link
Member

The change has been merged and will be part of the next release.

If you want to try and verify it in your application, use the current SNAPSHOT build as described in our README.md

Thank you for the report/contribution!

@timonback timonback moved this from In Progress to Staged for release in Springwolf Jul 24, 2023
@timonback timonback moved this from Staged for release to Done in Springwolf Jul 28, 2023
@timonback
Copy link
Member

Thank your for the report, the issue has been addressed in the new release.

Feel free to reopen this issue if there is still something missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working staged for release
Projects
Status: Done
Development

No branches or pull requests

2 participants