We have 4 consumers for processing some regular messages.
The consumers have been run well for 2 months. But they suddenly stop consume messages from broker days ago.
On the broker console it shows the connection is running. But no channel exists.
I shutdown the connection and let it reconnect, the channel appears after reconnect. But all channels get lost after processing same messages next day.
On the consumers, I can see some messages been processed on all of the 4 nodes. And the messages still in the queue.
I suspect it might cause by some unexpected exceptions when processing the message.
But I can't find a way to debug and identify which message caused the channel disconnection.
Does anyone have any idea how should I do to locate the root cause? Thanks.
Below is the consumer configuration:
ConnectionFactory factory = new ConnectionFactory();
factory.setUsername(userName);
factory.setPassword(password);
factory.setVirtualHost(virtualHost);
factory.setHost(hostName);
factory.setPort(portNumber);
factory.setRequestedHeartbeat(60);
factory.setAutomaticRecoveryEnabled(true);
factory.setNetworkRecoveryInterval(300000);