Results 1 to 10 of 11

Thread: JMSChannel performance

Hybrid View

  1. #1

    Default JMSChannel performance

    Hi,
    We are having a PollableJMSChannel and a service activator for the same. The performance of the JMS channel seems to be quite slow. When we try to send a large number of messages to this channel the service activator seems to be receiving the messages very slowly. We are using activemq as our jms provider and spring CachingConnectionFactory in our configuration.
    Could you please tell us how to tune the configuration to improve the performance?

  2. #2
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    213

    Default

    Any reason for using PollableJMSChannel? What is the polling frequency configured in your poller? Would be helpful if you post the configuration here.
    Also would be great if you tell all where exactly you think the performance is bad and what exactly are you expecting.

  3. #3
    Join Date
    Sep 2011
    Posts
    167

    Default

    well if you are using pollable channel have you configured poller for that channel or have you configured global level poller configuration...BELOW IS THE GLOBAL LEVEL POLLER CONFIGURATION IS..

    Code:
    <si:poller max-messages-per-poll="1" id="defaultPoller" default="true">
    		<si:interval-trigger interval=10 />
    	</si:poller>
    additionally you must also implement logging channel adapter and set it level to INFO to see what is happening in that pollable channel..!!

  4. #4

    Default

    this is the configuration that we use. the poller element is defined for the service activator with fixed rate as 50ms and timeout as 5000 ms.


    <jms:channel id="currentLocationJMSBufferDataChannel"
    acknowledge="transacted" message-driven="false"
    connection-factory="cachingConnectionFactory" message-converter="messageConverter"
    queue-name="dwara.processingunit.currentLocationQueue">
    </jms:channel>

    <si:service-activator id="currentLocationJMSServiceActivator"
    input-channel="currentLocationJMSBufferDataChannel" ref="currentLocationDataHandler"
    method="handleBufferedData">
    <sioller fixed-rate="50" receive-timeout="5000"
    task-executor="currentLocationJMSDataExecutor" />
    </si:service-activator>

    <task:executor id="currentLocationJMSDataExecutor"
    pool-size="5" queue-capacity="0" rejection-policy="DISCARD" />

    <bean id="currentLocationDataHandler"
    class="com.trimble.mrm.dwara.processingunit.intern al.handler.CurrentLocationDataHandler">
    <constructor-arg index="0" value="20" />
    </bean>

    Each jms message contains a data buffer and the service activator inserts the buffer data into DB. The jms queues would be getting messages at the rate of 50-150 messages per second.

  5. #5
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    213

    Default

    The rate at which messages are coming is high and your polling frequency is too low, you wont be receiving more than 20 messages per sec with this frequency.

    Are these messages coming from an external system? I would prefer using jms:message-driven-channel-adapter configured with a SimpleMessageListenerContainer. Tune the parameters of the container for some suitable value of max concurrent consumers.

    See if making these changes help you in seeing a better performance in receiving the messages.

  6. #6
    Join Date
    Sep 2011
    Posts
    167

    Default

    Quote Originally Posted by Amol Nayak View Post
    I would prefer using jms:message-driven-channel-adapter configured with a SimpleMessageListenerContainer. Tune the parameters of the container for some suitable value of max concurrent consumers.
    Hi Anmol ,

    Can you please explain a little SimpleMessageListenerContainer....with an example..??

  7. #7
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,029

    Default

    Please read the Spring and Spring Integration References.

    The JMS SI sample on github uses a message-driven-channel-adapter.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •