Dear Team, I'm facing a challenge on Production while using activemq with Quakrus Camel. Connection keeps on increasing on AMQ server and after times server gets stuck.
*Quarkus Version : 3.6.3* *Camel Version : 4.2.0* *ActiveMQ Version : 5.15.6* *Connection String : failover:(tcp://localhost:61616,tcp://localhost:61716)?jms.rmIdFromConnectionId=true&maxReconnectAttempts=0* In Quarkus with Activemq, first existing connections closed then create new connection : 2025-04-26 :12:26:43.446 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ca.pr.SendProcessor] (executor-thread-1) >>>> activemq://queue:SMSQueue_ODD?timeToLive=90000 Exchange[77E026A224B77A3-0000000000000002] 2025-04-26 :12:26:43.458 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.ut.ThreadPoolUtils] (executor-thread-1) Shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@488777fc[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] is shutdown: true and terminated: true took: 0.001 seconds. 2025-04-26 :12:26:43.459 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.tr.fa.FailoverTransport] (executor-thread-1) Stopped tcp://localhost:61616 2025-04-26 :12:26:43.459 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.ut.ThreadPoolUtils] (executor-thread-1) Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@26aae5c4[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2] 2025-04-26 :12:26:43.461 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.tr.tc.TcpTransport] (executor-thread-1) Stopping transport tcp://localhost/127.0.0.1:61616@55188 2025-04-26 :12:26:43.462 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.th.TaskRunnerFactory] (executor-thread-1) Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@1d670bb9[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] 2025-04-26 :12:26:43.464 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.tc.TcpTransport] (ActiveMQ Task-1) Closed socket Socket[addr=localhost/127.0.0.1,port=61616,localport=55188] 2025-04-26 :12:26:43.464 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.ut.ThreadPoolUtils] (executor-thread-1) Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@1d670bb9[Running, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 0] 2025-04-26 :12:26:43.464 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.th.TaskRunnerFactory] (executor-thread-1) Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@1a569160[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] 2025-04-26 :12:26:43.465 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.tr.fa.FailoverTransport] (executor-thread-1) Reconnect was triggered but transport is not started yet. Wait for start to connect the transport. 2025-04-26 :12:26:43.467 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.tr.fa.FailoverTransport] (executor-thread-1) Started unconnected 2025-04-26 :12:26:43.468 DEBUG traceId=03fb633d871167a31172bbb534a8025b, parentId=, spanId=b224975053aa766b, sampled=false [or.ap.ac.tr.fa.FailoverTransport] (executor-thread-1) Waking up reconnect task 2025-04-26 :12:26:43.468 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.fa.FailoverTransport] (ActiveMQ Task-1) urlList connectionList:[tcp://localhost:61616], from: [tcp://localhost:61616] 2025-04-26 :12:26:43.469 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.fa.FailoverTransport] (ActiveMQ Task-1) Attempting 0th connect to: tcp://localhost:61616 2025-04-26 : 12:26:43.499 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.WireFormatNegotiator] (ActiveMQ Task-1) Sending: WireFormatInfo { version=12, properties={StackTraceEnabled=true, PlatformDetails=Java, CacheEnabled=true, TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, ProviderName=ActiveMQ, TightEncodingEnabled=true, MaxFrameSize=9223372036854775807, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000, MaxFrameSizeEnabled=true, ProviderVersion=5.18.3}, magic=[A,c,t,i,v,e,M,Q]} 2025-04-26 : 12:26:43.699 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.fa.FailoverTransport] (ActiveMQ Task-1) Connection established 2025-04-26 : 12:26:43.699 INFO traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.fa.FailoverTransport] (ActiveMQ Task-1) Successfully connected to tcp://localhost:61616 2025-04-26 : 12:26:43.700 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.InactivityMonitor] (ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@54412) Using min of local: WireFormatInfo { version=12, properties={StackTraceEnabled=true, PlatformDetails=Java, CacheEnabled=true, TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, ProviderName=ActiveMQ, TightEncodingEnabled=true, MaxFrameSize=9223372036854775807, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000, MaxFrameSizeEnabled=true, ProviderVersion=5.18.3}, magic=[A,c,t,i,v,e,M,Q]} and remote: WireFormatInfo { version=12, properties={TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, ProviderName=ActiveMQ, StackTraceEnabled=true, PlatformDetails=Java, CacheEnabled=true, TightEncodingEnabled=true, MaxFrameSize=104857600, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000, ProviderVersion=5.15.6}, magic=[A,c,t,i,v,e,M,Q]} 2025-04-26 : 12:26:43.701 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.WireFormatNegotiator] (ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@54412) Received WireFormat: WireFormatInfo { version=12, properties={TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, ProviderName=ActiveMQ, StackTraceEnabled=true, PlatformDetails=Java, CacheEnabled=true, TightEncodingEnabled=true, MaxFrameSize=104857600, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000, ProviderVersion=5.15.6}, magic=[A,c,t,i,v,e,M,Q]} 2025-04-26 : 12:26:43.703 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.WireFormatNegotiator] (ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@54412) tcp://localhost/127.0.0.1:61616@54412 before negotiation: OpenWireFormat{version=12, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false, maxFrameSize=9223372036854775807, maxFrameSizeEnabled=true} 2025-04-26 : 12:26:43.703 DEBUG traceId=, parentId=, spanId=, sampled= [or.ap.ac.tr.WireFormatNegotiator] (ActiveMQ Transport: tcp://localhost/127.0.0.1:61616@54412) tcp://localhost/127.0.0.1:61616@54412 after negotiation: OpenWireFormat{version=12, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false, maxFrameSize=104857600, maxFrameSizeEnabled=true} 2025-04-26 : 12:26:43.702 DEBUG traceId=a4c45fe7adb691892275d8b129b1bfdc, parentId=, spanId=32c5c0bad22faaae, sampled=false [or.ap.ca.co.jm.JmsConfiguration$CamelJmsTemplate] (executor-thread-1) Executing callback on JMS Session: JmsPoolSession { ActiveMQSession {id=ID:Bikash-54411-1745645483932-1:1:1,started=false,closed=false} java.lang.Object@9cacfd0 } 2025-04-26 : 12:26:43.709 DEBUG traceId=a4c45fe7adb691892275d8b129b1bfdc, parentId=, spanId=32c5c0bad22faaae, sampled=false [or.ap.ca.co.jm.JmsBinding] (executor-thread-1) Ignoring non primitive header: NotifyHeaders of class: java.util.LinkedHashMap with value: ******************* 2025-04-26 : 12:26:43.710 DEBUG traceId=a4c45fe7adb691892275d8b129b1bfdc, parentId=, spanId=32c5c0bad22faaae, sampled=false [or.ap.ca.co.jm.JmsBinding] (executor-thread-1) Ignoring non primitive header: notifyParamBody of class: java.util.LinkedHashMap with value: ******************* 2025-04-26 :11:01:24.233 DEBUG traceId=a4c45fe7adb691892275d8b129b1bfdc, parentId=, spanId=32c5c0bad22faaae, sampled=false [or.ap.ca.co.jm.JmsConfiguration] (executor-thread-1) Sending JMS message to: queue://SMSQueue with message: ActiveMQTextMessage {commandId = 0, responseRequired = false, messageId = null, originalDestination = null, originalTransactionId = null, producerId = null, destination = null, transactionId = null, deliveryTime = 0, expiration = 0, timestamp = 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = true, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0 [image: image.png] --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- While trying the same piece of code with the older version of Camel, it first opens the connection and after sending messages in AMQ , it immediately closes the connection. and there are no open connections left. *Camel Version : 2.15* *ActiveMQ Version : 5.15.6* *Connection String : failover:(tcp://localhost:61616,tcp://localhost:61716)?jms.rmIdFromConnectionId=true&maxReconnectAttempts=0* 11:29:15,496 | DEBUG | estlet-676081409 | TaskRunnerFactory | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@7e4894ba[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] 11:29:15,498 | DEBUG | estlet-676081409 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Reconnect was triggered but transport is not started yet. Wait for start to connect the transport. 11:29:15,499 | DEBUG | estlet-676081409 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Started unconnected 11:29:15,500 | DEBUG | estlet-676081409 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Waking up reconnect task 11:29:15,502 | DEBUG | ActiveMQ Task-1 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | urlList connectionList:[tcp://localhost:61616], from: [tcp://localhost:61616] 11:29:15,502 | DEBUG | ActiveMQ Task-1 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Attempting 0th connect to: tcp://localhost:61616 11:29:15,504 | DEBUG | ActiveMQ Task-1 | WireFormatNegotiator | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Sending: WireFormatInfo { version=10, properties={TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, StackTraceEnabled=true, CacheEnabled=true, TightEncodingEnabled=true, MaxFrameSize=9223372036854775807, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000}, magic=[A,c,t,i,v,e,M,Q]} 11:29:15,504 | DEBUG | ActiveMQ Task-1 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Connection established 11:29:15,504 | INFO | ActiveMQ Task-1 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Successfully connected to tcp://localhost:61616 11:29:15,507 | DEBUG | .0.1:61616@35296 | InactivityMonitor | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Using min of local: WireFormatInfo { version=10, properties={TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, StackTraceEnabled=true, CacheEnabled=true, TightEncodingEnabled=true, MaxFrameSize=9223372036854775807, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000}, magic=[A,c,t,i,v,e,M,Q]} and remote: WireFormatInfo { version=12, properties={TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, ProviderName=ActiveMQ, StackTraceEnabled=true, PlatformDetails=Java, CacheEnabled=true, TightEncodingEnabled=true, MaxFrameSize=104857600, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000, ProviderVersion=5.15.6}, magic=[A,c,t,i,v,e,M,Q]} 11:29:15,507 | DEBUG | .0.1:61616@35296 | WireFormatNegotiator | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Received WireFormat: WireFormatInfo { version=12, properties={TcpNoDelayEnabled=true, SizePrefixDisabled=false, CacheSize=1024, ProviderName=ActiveMQ, StackTraceEnabled=true, PlatformDetails=Java, CacheEnabled=true, TightEncodingEnabled=true, MaxFrameSize=104857600, MaxInactivityDuration=30000, MaxInactivityDurationInitalDelay=10000, ProviderVersion=5.15.6}, magic=[A,c,t,i,v,e,M,Q]} 11:29:15,508 | DEBUG | .0.1:61616@35296 | WireFormatNegotiator | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | tcp://localhost/127.0.0.1:61616@35296 before negotiation: OpenWireFormat{version=10, cacheEnabled=false, stackTraceEnabled=false, tightEncodingEnabled=false, sizePrefixDisabled=false, maxFrameSize=9223372036854775807} 11:29:15,508 | DEBUG | .0.1:61616@35296 | WireFormatNegotiator | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | tcp://localhost/127.0.0.1:61616@35296 after negotiation: OpenWireFormat{version=10, cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true, sizePrefixDisabled=false, maxFrameSize=104857600} 11:29:15,511 | DEBUG | estlet-676081409 | msConfiguration$CamelJmsTemplate | 208 - org.apache.servicemix.bundles.spring-jms - 3.2.12.RELEASE_2 | Executing callback on JMS Session: ActiveMQSession {id=ID:Bikash-36657-1745646546084-1:6:1,started=false} java.lang.Object@282539d4 11:29:15,513 | DEBUG | estlet-676081409 | JmsBinding | 209 - org.apache.camel.camel-jms - 2.15.1.redhat-621084 | Ignoring non primitive header: NotifyHeaders of class: java.util.HashMap with value: ************************************************ 11:29:15,513 | DEBUG | estlet-676081409 | JmsBinding | 209 - org.apache.camel.camel-jms - 2.15.1.redhat-621084 | Ignoring non primitive header: notifyParamBody of class: java.util.LinkedHashMap with value: *********************************************************** 11:29:15,514 | DEBUG | estlet-676081409 | JmsConfiguration | 209 - org.apache.camel.camel-jms - 2.15.1.redhat-621084 | Sending JMS message to: queue://SMSQueue with message: ActiveMQTextMessage {commandId = 0, responseRequired = false, messageId = null, originalDestination = null, originalTransactionId = null, producerId = null, destination = null, transactionId = null, expiration = 0, timestamp = 0, arrival = 0, brokerInTime = 0, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = true, type = null, priority = 0, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, dataStructure = null, redeliveryCounter = 0, size = 0, properties = ****************************************************** 11:29:15,519 | DEBUG | estlet-676081409 | ThreadPoolUtils | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@77317b71[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] is shutdown: true and terminated: true took: 0.000 seconds. 11:29:15,520 | DEBUG | estlet-676081409 | FailoverTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Stopped tcp://localhost:61616 11:29:15,520 | DEBUG | estlet-676081409 | ThreadPoolUtils | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@7e4894ba[Running, pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 2] 11:29:15,521 | DEBUG | estlet-676081409 | TcpTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Stopping transport tcp://localhost/127.0.0.1:61616@35296 11:29:15,522 | DEBUG | estlet-676081409 | TaskRunnerFactory | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@684a3f63[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] 11:29:15,523 | DEBUG | ActiveMQ Task-1 | TcpTransport | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Closed socket Socket[addr=localhost/127.0.0.1,port=61616,localport=35296] 11:29:15,523 | DEBUG | estlet-676081409 | ThreadPoolUtils | 185 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621084 | Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@684a3f63[Running, pool size = 1, active threads = 0, queued tasks = 0, completed tasks = 1] [image: image.png] Please help me with this. -- *Regards,* *Bikash Kaushik*