Skip to content

Conversation

garyrussell
Copy link
Contributor

Resolves #1981

@garyrussell
Copy link
Contributor Author

cc/ @tomazfernandes

@tomazfernandes
Copy link
Contributor

tomazfernandes commented Oct 21, 2021

Hi @garyrussell , so it turns out there is a use case for not having a simple logging consumer after all! 😄

I like the approach of creating the DLT consumer and not starting. My initial thought was to simply not create the consumer, but this way the consumer is there if the user wants to start it, and this should also work if it's a custom DLT handler.

What I'm thinking is, what if instead of having an autoStartup flag, we let the users optionally choose a dedicated listener container factory for the DLT consumer in the annotation / builder? It might give the users even more configuration flexibility for the DLT and leverage the already existing autoStartup flag from the factory.

Of course that might be an overkill - I like the solution as is too!

@artembilan
Copy link
Member

Of course that might be an overkill

I think we can merge this as is just with a mentioned flag and come back revising it in favor of more complex and configurable solution when concern arises.

@garyrussell
Copy link
Contributor Author

@tomazfernandes Thanks for reviewing.

I like the approach of creating the DLT consumer and not starting. My initial thought was to simply not create the consumer, but this way the consumer is there if the user wants to start it, and this should also work if it's a custom DLT handler.

Yes, my initial thought was the same too, but after digging in, this seemed a much simpler solution and allows the user to start/stop the DLT container, perhaps on a schedule, later.

@artembilan

I think we can merge this as is...

I concur; this is a bit of a corner case and I don't think it needs any more complexity at this time.

@artembilan artembilan merged commit 4e2a237 into spring-projects:main Oct 22, 2021
@tomazfernandes
Copy link
Contributor

@garyrussell and @artembilan, sure! As it impacts the public API I just wanted to take a look at the possibilities.

I'm really glad to see people are using the feature and requesting additional features 😃

Thanks a lot for your great work and for the opportunity to contribute to such an important framework!

@garyrussell
Copy link
Contributor Author

I'm really glad to see people are using the feature and requesting additional features 😃

Yes, it's a testament to your excellent hard work!

@garyrussell garyrussell deleted the GH-1981 branch October 26, 2021 20:32
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

Successfully merging this pull request may close these issues.

Add an Option to Not Start the DLT Consumer

3 participants