Reputation: 2177
Set up - ActiveMQ Artemis 2.14.0 and Spring Boot.
Problem statement: I want to achieve throttling in terms of reading / limiting the messages to be read from ActiveMQ.
This can be achieved by configuring the consumerMaxRate
during the start time and that works fine too. I want to change this parameter on the fly to increase / decrease the rate of consumption without stopping my application. I have tried by re-initializing the beans, setting the activemqconnectionfactories again but somehow the connection is maintained with the initial value only.
Any suggestion would be helpful.
I have tried searching the documentation but it only says about the parameter but with no examples.
Upvotes: 0
Views: 505
Reputation: 35038
The consumerMaxRate
cannot be changed while the connection to the broker is active. You'd need to close the connection, set a new consumerMaxRate
, and then create a connection with the new configuration.
Upvotes: 1