You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm trying to migrate a Spring Boot based app to Micronaut. In Spring, we can do the following:
@Bean
public StreamsBuilderFactoryBean someKStreamBuilder(KafkaProperties kafkaProperties) {
String applicationId = "my-desired-application-id";
return new StreamsBuilderFactoryBean(createKStreamsConfig(applicationId, kafkaProperties));
}
@Bean
public GlobalKTable<UUID, MyAvroEvent> myGlobalKTable(
@Qualifier("someKStreamBuilder") StreamsBuilder streamsBuilder) {
return streamsBuilder.globalTable("my-avro-event-topic", Materialized.as(""my-avro-event-topic-store"));
}
which I can then use in my processing by getting the Read Only store, etc.
However, it looks like micronaut-kafka-streams will ONLY create streams for beans that return KStream objects. I see a couple of issues posted here, however I can't for the life of me in the documentation find a solution for the workaround for this. I need to have a GlobalKTable of a topic alone, not related to any other topology. in other words, after the globalTable is registered in the streamsBuilder, that's all I want.
What is the suggested approach in micronaut-kafka-streams here? The last thing I want is to have to create/define a dummy topic just to have a KStream object to return.
The text was updated successfully, but these errors were encountered:
seems what would be best is to enhance the module to do what you want. Code is open source and contributions are welcome
Sure, I could do that and am happy to if needed, but what I'm asking is what is the current recommended approach by active maintainers? I could tweak whatever I want to work however I want, and I've done that plenty of times with other open source libraries, but if Micronaut has some opinionated recommendations, I'd rather follow them first rather than shoehorn in an approach to make sure I'm keeping things consistent, especially if there is already a solution.
I'm not saying Micronaut doesn't support it anyway, I'm just saying I can't find documentation on such a use-case. It may be missing docs or missing functionality, I just need that clarified.
I've got a workaround anyway which works for my use-case as I happen to need another Stream (I just create the global k tables with a separate ConfiguredStreamBuilder but in the KStream bean, so I pass all the ConfiguredStreamBuilders as parameters) but it wouldn't necessarily work if all I wanted were GlobalKTables in my app
Issue description
Hi. I'm trying to migrate a Spring Boot based app to Micronaut. In Spring, we can do the following:
which I can then use in my processing by getting the Read Only store, etc.
However, it looks like
micronaut-kafka-streams
will ONLY create streams for beans that returnKStream
objects. I see a couple of issues posted here, however I can't for the life of me in the documentation find a solution for the workaround for this. I need to have a GlobalKTable of a topic alone, not related to any other topology. in other words, after the globalTable is registered in the streamsBuilder, that's all I want.What is the suggested approach in
micronaut-kafka-streams
here? The last thing I want is to have to create/define a dummy topic just to have a KStream object to return.The text was updated successfully, but these errors were encountered: