I am running a server implemented in Java that has several consumers for ActiveMQ Artemis open while it is running.
Currently I have the consumers set up to send acknowledgements after the logic to process these events complete, and when the server needs to shut down I would like to close all of these org.apache.activemq.artemis.api.core.client.ClientConsumer
objects gracefully. However, since my events can sometimes take 30-40 seconds to process I consistently run into this warning message when calling ClientConsumer.close()
:
W: [SLF4J org.apache.activemq.artemis.core.client] AMQ212002: Timed out waiting for handler to complete processing
I see that this log is from the closing code and that it is hard-coded to wait 10 seconds for events to finish processing so I'm wondering if there is some other way to accomplish closing client consumers safely while being able to wait more than 10 seconds for events to finish.
I was going to suggest using ClientSession.stop()
but that method uses the same hard-coded timeout. As far as I can tell there is no way to use the current Core API to extend the timeout here.
This looks like a worthwhile feature to implement so I've opened ARTEMIS-5093.