I developing an application which using the spring-kafka package and changing the amount of data it handled in run time.
I want to let the system the ability to change in run time the number of concurrency
depend on the pressure the system feel (something that I will defined).
Right now the my solution is to doStop
and doStart
the ConcurrentMessageListenerContainer
explicitly but I look for a clean way which not damage the stream and not touch an internal methods of the ConcurrentMessageListenerContainer
explicitly
Asked
Active
Viewed 247 times
1

Lupidon
- 599
- 2
- 17
1 Answers
1
You don't need to interact with these internal methods; use stop()
and start()
, which are public, instead.
You cannot change the concurrency dynamically, only by stopping and starting the container, changing the concurrency while stopped.

Gary Russell
- 166,535
- 14
- 146
- 179