You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/11/01 11:21:34 UTC

[jira] [Commented] (CAMEL-7950) SJMS's Producers creates a new session per message request, this is both a performance issue and problem when using transactions

    [ https://issues.apache.org/jira/browse/CAMEL-7950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14193062#comment-14193062 ] 

Claus Ibsen commented on CAMEL-7950:
------------------------------------

Have you configured a connection pool? You need to use that for higher performance.

> SJMS's Producers creates a new session per message request, this is both a performance issue and problem when using transactions
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-7950
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7950
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-sjms
>    Affects Versions: 2.14.0
>            Reporter: Aaron Whiteside
>
> SJMS's Producers creates a new Session per message request, this is both a performance issue and a problem when using transactions.
> Sessions should be cached in ThreadLocal for performance reasons. Of course you may want to limit the total number of cached sessions or even implement a stack/queue of sessions to reuse. As long as a new session isn't created for every single message produced to a Queue/Topic.
> Second the same session should be used for any consumption and production to any queues by a thread when transactions are enabled. If a single route is consuming from JMS and producing to JMS, one would expect the same session to be used to provide atomic consumption and production to the queues/topics involved.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)