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

Why do services need to @Import KafkaConsumerFactoryConfiguration #42

Open
cer opened this issue Aug 17, 2020 · 1 comment
Open

Why do services need to @Import KafkaConsumerFactoryConfiguration #42

cer opened this issue Aug 17, 2020 · 1 comment
Assignees

Comments

@cer
Copy link
Contributor

cer commented Aug 17, 2020

For example, see microservices-patterns/ftgo-application#108

@dartartem
Copy link
Contributor

It seems it is not necessary anymore.

KafkaConsumerFactory is added to OrderHistoryServiceMessagingConfiguration by this commit: microservices-patterns/ftgo-application@6669693 because tram was not updated to latest kafka.

Now tram contains KafkaConsumerFactory in EventuateTramKafkaMessageConsumerConfiguration : https://github.com/dartartem/eventuate-tram-core/blob/master/eventuate-tram-spring-consumer-kafka/src/main/java/io/eventuate/tram/spring/consumer/kafka/EventuateTramKafkaMessageConsumerConfiguration.java#L15

And order history service uses EventuateTramKafkaMessageConsumerConfiguration here: https://github.com/microservices-patterns/ftgo-application/blob/master/ftgo-order-history-service/src/main/java/net/chrisrichardson/ftgo/cqrs/orderhistory/main/OrderHistoryServiceMain.java#L17

So no need to define KafkaConsumerFactory in OrderHistoryServiceMessagingConfiguration: https://github.com/microservices-patterns/ftgo-application/blob/master/ftgo-order-history-service/src/main/java/net/chrisrichardson/ftgo/cqrs/orderhistory/main/OrderHistoryServiceMain.java#L14

I will remove it.

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