Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Spring Integration & JMS over ActiveMQ

  1. #11
    Join Date
    Aug 2008
    Posts
    6

    Default Spring Integration & JMS over ActiveMQ

    Spring Integration should do the JMS correlation, rather than fobbing it off on the poor benighted user.

    The interceptor approach works, but even in M6 you need expose this in the user configuration, which doesn't seem right to me.

  2. #12
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,854

    Default

    Thanks again for all of the feedback. Indeed, Spring Integration should handle the correlation behind the scenes. From my perspective, this is part of a larger design issue where we need to provide a clearer distinction between Channel Adapters and Gateways. In other words, the reason this currently places the burden on the developer is that for outbound JMS request/reply, we only have support for unidirectional Channel Adapters. If on the other hand, we provide an outbound JMS Gateway, the request/reply correlation will happen there in a single module that defines the request and reply channels. Neil is correct to say that these responsibilities should be encapsulated. For instance, the developer should not need to know about things such as ReplyMessageCorrelator. That is an internal component, while "channel-adapter" and "gateway" are part of the *public* API. So, please keep an eye on the JIRA issue, and feel free to provide feedback there or in this thread as we address the issue and you get a chance to try it out.

    Thanks,
    Mark

  3. #13

    Default

    Hi,

    My case is much simpler, I have a JMS gateway reading from a queue into a channel.
    I want to use an aggregator to combine several messages. I am getting the error:
    "AggregatingMessageHandler requires the 'correlationId' property"

    Was this issue resolved in a certain snapshot?

    Thanks,
    Marwan

  4. #14
    Join Date
    Dec 2008
    Posts
    1

    Default

    Sorry to revive an old thread...

    So how do you use the outbound gateway? Here is what I am trying to do in order to test a request/reply scenario:

    1. I am using a MessageChannelTemplate object to send a request message to a channel, which is set as the request-channel of an outbound gateway:
      Code:
      requestChannelTemplate.send(requestMsg, requestChannel);
      Code:
      <integration:channel id="requestChannel" />
      <jms:outbound-gateway connection-factory="singleConnectionFactory" request-channel="requestChannel"
      		request-destination-name="queue:request" reply-destination-name="queue:reply" />
      I want the current thread to block until a reply is received.

    2. In a separate thread, send a JMS reply, simulating a response from an external system.


    On the reply message, no matter what I set the JMS or Spring Integration correlation ID to, the request always times out. How is the reply message being correlated to the request? What do I need to do in order to get this to work?

Posting Permissions

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