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

Relaxing replying KafkaTemplate in AbstractKafkaListenerContainerFactory #723

Closed
nyilmaz opened this issue Jul 3, 2018 · 1 comment
Closed

Comments

@nyilmaz
Copy link
Contributor

nyilmaz commented Jul 3, 2018

Since KafkaTemplate has its own message converter, shouldn't we relax that instance property to wildcard types such as: private KafkaTemplate<?, ?> replyTemplate;.

Otherwise spring-kafka forces users of listener container factory to reply exactly the same semantics as listener ie. <K, V>.

What would you think?

@garyrussell
Copy link
Contributor

Good point; yes.

As a work-around you can just inject KafkaTemplate with no generics and suppress the warning.

garyrussell added a commit to garyrussell/spring-kafka that referenced this issue Jul 11, 2018
Resolves spring-projects#723

The replying template might have different generic types for the Key/Value
than the incoming container.
artembilan pushed a commit that referenced this issue Jul 11, 2018
Resolves #723

The replying template might have different generic types for the Key/Value
than the incoming container.
garyrussell added a commit that referenced this issue Jul 11, 2018
Resolves #723

Missing change from previous commit.
denis554 added a commit to denis554/spring-kafka that referenced this issue Mar 27, 2019
Resolves spring-projects/spring-kafka#723

The replying template might have different generic types for the Key/Value
than the incoming container.
denis554 added a commit to denis554/spring-kafka that referenced this issue Mar 27, 2019
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

2 participants