Announcement Announcement Module
Collapse
No announcement yet.
what different between message-driven-channel-adapter and jms:inbound-gateway Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • what different between message-driven-channel-adapter and jms:inbound-gateway

    hi,all:

    after read SI reference, I am confuse about it.

    according the document, it looks "jms:message-driven-channel-adapter" and "jms:inbound-gateway" doing a same thing.

  • #2
    The difference is that any "-channel-adapter" in Spring Integration is *one way* while any "gateway" adapter supports *request/reply*. So, for example, when using the JMS "inbound-gateway", any JMS client can send a Message that has a JMSReplyTo property and expect a response on the Destination as long as the Spring Integration Message flow that begins with that adapter does in fact generate a response.

    Comment


    • #3
      thank you very much

      Comment


      • #4
        Hi

        And in code it looks like this:
        Code:
        this.registerBeanDefinitionParser("inbound-gateway", new JmsMessageDrivenEndpointParser(true));
        this.registerBeanDefinitionParser("message-driven-channel-adapter", new JmsMessageDrivenEndpointParser(false));
        The boolean flag is used to set expectReply property.
        When the listener receives incoming JMS message, "inbound-gateway" sends it to the channel ("pulls" it into Spring-Integration) using:
        Code:
        this.channelTemplate.send(requestMessage)
        "message-driven-channel-adapter" uses:
        Code:
        this.channelTemplate.sendAndReceive(requestMessage)
        which may block when you are not going to reply to JMS message (which is common in case JMS is used as some kind of notification service).

        regards
        Grzegorz Grzybek

        Comment

        Working...
        X