Aaron Whiteside created CAMEL-7994:
--------------------------------------
Summary: SJMSComponent effectively ignores setConnectionCount()
Key: CAMEL-7994
URL: https://issues.apache.org/jira/browse/CAMEL-7994
Project: Camel
Issue Type: Bug
Components: camel-sjms
Affects Versions: 2.14.0
Reporter: Aaron Whiteside
SJMSComponent effectively ignores setConnectionCount()
This is because the JmsProducer, by default, pre-populates sessions+producers
on Producer.doStart(), which is called by the CamelContext in a single thread
and the way the ConnectionFactoryResource is configured, it returns the most
recently idle connection (So really it always returns the first connection
opened).
This patch attached makes the ConnectionFactoryResource effectively return
connections in a round-robbin. Unit test attached in included.
This is important because TCP has a certain overhead per socket which makes it
impossible to achieve much more than 6~ messages a second, regardless of the
CPU and IO resources available to a broker. To fully utilize a broker multiple
connections must be opened.
This is also important if your ConnectionFactory represent a cluster (Like in
the case of HornetQ), where subsequent connections are balanced across nodes in
the cluster.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)