Colin Riddell
Colin Riddell

Reputation: 427

Quarkus: Why Do I need to specify Kafka sink and sources in application.properties

I've been learning about Quarkus and it is pretty nice. I'm enjoying that it integrates well with other things.

I've been following this guide (https://quarkus.io/guides/kafka) on using Quarkus with Apache Kafka and I got a little miffed at why we need to specify the sink and source "endpoints"? "channels" in the application.properties file. Are these just not a repeat of what's in the code? Maybe I'm not understanding something here, but I thought it would be really nice to not need to configure these.

Also, does that mean if I have a Quarkus app that's speaking to several different topics that I'd need to configure the sync for each of them?

I can't tell if I'm just missing something OR if the guide isn't clear.

Upvotes: 1

Views: 207

Answers (1)

Ken
Ken

Reputation: 835

The guide is correct.

The reason is that the Kafka topic names could be different from the channel name on @Incoming or @Outgoing.

Some environments might have meaningless names of topics, such as "abcdefg", but you can define the channel name to be "prices".

Also, it means that you can use @Outgoing and @Incoming in the same application/microservice pointing to the same Kafka topic, but using different channel names in the configuration.

Upvotes: 1

Related Questions