You've not given much detail about the setup and the pattern of life for this broker and its clients, and without more information it'll be hard to help. In general yes clients should reconnect and the broker should detect disconnected clients though I don't remember if it logs; from long-ago memory I think so but don't remember. But you can test easily that by killing the consumer and then restarting and kill - 9ing it (to test graceful socket closure and TCP timeout respectively). But if you give some more information we might be able to suggest some things to look at more closely.
What connection string are your clients using to connect to the broker? We don't need hostnames and ports, just the transport protocol and options. Are you using a network of brokers or a single broker? If a network, what's the topology? Does a TCP socket exist between client and broker when this happens? Are bytes flowing across the connection. Does the web console show the connected consumer? If so how many messages are in-flight to that consumer? The JMX MBeans view in the web console can be a good way to explore this info. Are the messages expiring before the consumer gets to them? Does the consumer successfully process all messages or are messages failing to get processed? Are system clocks relatively synchronized between all hosts? Are you using exclusive consumers or any more unusual destination types? The broker is a Java process, so you can use thread dumps and CPU samples from tools like JVisualVM to capture what the broker is doing while this is going on. If your consumer is also on the JVM you can do the same for it. Those might make it clear to you what's wrong, or you can share them with us to help analyze if there's nothing sensitive in them. (The broker should be fine, but the consumer processes will contain stack traces that includes your classes and methods so you'll have to be OK with that if you share them.) Tim On Wed, Feb 2, 2022, 2:28 PM Gunawan, Rahman (GSFC-703.H)[BUSINESS INTEGRA, INC.] <rahman.guna...@nasa.gov.invalid> wrote: > Our company is using Activemq 5.15.4. There is problem with consuming the > messages from activemq recently. Restart ActiveMQ resolved the problem. > However; after a while, it stopped consuming messages again. There are no > errors in log. > Will it print any errors in the activemq log if the connection is > bad/hung? Will activemq detect bad connection and re-establish the > connection? How to monitor the connections? > > Thanks in advance for any help. > > Regards, > Rahman >