On Tuesday, 30 September 2025 at 09:58, Gael LE BELLEGO
<[email protected]> wrote:
> Peter, we are using ibm.mq.allclients in other projets, including a tool for
> performance testing, and it's running fine (in same condition)
> And about TCP connexions (using both netstat and tcpdump) we noticed that it
> kept opening new connexions : the "ESTABLISHED" one keeps changing, thus it
> sounds like the problem is around here.
> That's why we considered (but failed!) using a CachingConnectionFactory.
I worked for ~15 years in network engineering and solved many cases of "the
network is slow" with a packet capture showing clients not using long-lived
connections. Even on a 1Gbps LAN with client and server in the same IPv4
subnet, the overhead of setting up and tearing down connections can be
significant - 1ms for the TCP handshake, plus upper layer protocols to set up a
new connection limits you to 1,000 new connections per second.
> You say you have been consuming from MQ to ActiveMQ for years: it was using
> the camel JMS component?
Yes - both connecting to a local IBM MQ server and connecting to remote servers
using the following:
<bean id="ibmMqBroker" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.mq.jms.MQConnectionFactory">
<property name="hostName" value="MQSERVER" />
<property name="port" value="1414" />
<property name="queueManager" value="QM1" />
<property name="channel" value="QM1.SVRCONN" />
<property name="transportType" value="1"/>
<property name="description" value="Example IBM MQ Broker"/>
<property name="appName" value="example"/>
</bean>
</property>
</bean>
(you can swap jms.MQConnectionFactory for jakarta.MQConnectionFactory if
needed).
And the route:
<route id="td">
<from uri="ibmMqBroker:queue:QUEUE"/>
<to uri="localBroker:queue:LOCAL.QUEUE"/>
</route>
This works perfectly - currently there are just two long-lived TCP connections
active and about 300-400 messages/sec happily being exchanged.
Peter