Announcement Announcement Module
No announcement yet.
JMS Gateway help needed Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS Gateway help needed

    I saw a thread in the archives about JMS Gateway. I have similarly set up a jms-gateway within my configuration. I'm trying to read off an ActiveMQ queue and pass the message onto an SI message channel. However, I find that all the code comes alive, but the message just isn't picked off the queue. lil' help?

    I'm using the M4 release of Spring Integration.

    snippets of config:

       <bean id="inboundJMSFactory" class="org.apache.activemq.pool.PooledConnectionFactory" destroy-method="stop">
          <property name="connectionFactory">
             <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL">

  • #2

    Ok, scratch this. Moving over to M5 seemed to do the trick. Actually I seem to remember another fix being put in that last thread I was reading so this is my bad.

    One thing to note here though (that I struggled with annoyingly) is that handler-endpoint has been changed again. handler-ref is not longer there. it's just ref now!

    One thing that would really help is an xml configuration breakdown & explanation.


    • #3
      concurrent consumers

      I can't seem to get the gateway to process 2 messages at once.

      I've just taken a look at the code and it seems that the concurrent consumers is set to 1 and cannot be changed.

      Am I missing some configuration that allows this?


      • #4
        Currently, the only way to provide such configuration for the MessageListener container used by the gateway is to define the container separately and then provide it to the setContainer() method of JmsGateway. However, please feel free to open an issue for enabling this.



        • #5
          I also wanted to provide a quick reply to your other comments above. These changes felt necessary as we're working through the milestones trying to achieve the best and most intuitive model. Hopefully the ultimate result will be more than worth the inconveniences now, and the documentation will be enhanced significantly for the "Release Candidate" versions.

          Here's some of the rationale behind the changes that hopefully puts them into perspective...

          The <handler-endpoint/> element seemed too generic and also introduced a Spring Integration internal implementation detail to the terminology. On the other hand <service-activator/> is the EIP name and hence very well documented. This is the same reason that we changed both <source-endpoint/> and <target-endpoint/> to <channel-adapter/>.

          The 'handler-ref' attribute was originally added when there was also an option of using a <handler/> sub-element. This was consistent with other Spring namespace support where the x-ref naming is used for a simple attribute alternative to using a sub-element. However, the plain 'ref' attribute now provides more consistency within Spring Integration (also used with <router/>, <splitter/> etc.) and also with other Spring usage - for example, the Spring JMS namespace: <jms:listener ref="x" method="y"/>.

          I hope the changes make sense in that light, and thanks for the feedback.



          • #6
            Thanks Mark - I think that all makes sense (I read a few JIRA from Dave Syer too on that).

            I've raised a JIRA on the concurrent consumer thing -

            Last edited by mzaalam; Jul 23rd, 2008, 12:37 PM. Reason: added link to JIRA


            • #7
              The concurrency attributes (as well as maxMessagesPerTask and idleTaskExecutionLimit) can now all be configured as attributes on the <jms-gateway/> element. Please see the JIRA issue for more info.