camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <>
Subject [jira] [Resolved] (CAMEL-7994) SJMSComponent effectively ignores setConnectionCount()
Date Tue, 04 Nov 2014 03:06:34 GMT


Willem Jiang resolved CAMEL-7994.
       Resolution: Fixed
    Fix Version/s: 2.15.0

Applied the patch into camel master branch with thanks to Aaron.

> SJMSComponent effectively ignores setConnectionCount()
> ------------------------------------------------------
>                 Key: CAMEL-7994
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-sjms
>    Affects Versions: 2.14.0
>            Reporter: Aaron Whiteside
>            Assignee: Willem Jiang
>             Fix For: 2.15.0
>         Attachments: round-robbin.patch
> 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). So all sessions being pre-populated by all SJMS endpoints always
use the same single connection.
> This patch attached makes the ConnectionFactoryResource effectively return connections
in a round-robbin manor. Unit test is included.
> This is important because TCP has a certain overhead per socket which makes it impossible
to achieve much more than 6k~ 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 from the factory are balanced across nodes in the

This message was sent by Atlassian JIRA

View raw message