Results 1 to 4 of 4

Thread: JMS-outbound and transformer

  1. #1
    Join Date
    Jun 2011
    Posts
    29

    Default JMS-outbound and transformer

    Hi,

    I am trying to create my first app using spring integration, I am stuck with small issue, I would if anyone can help me in this?

    scenario - I have two queues ( 1- request and 2- response), I will be getting message in request queue and then do some transformation and drop the message to response queue

    I have configured transformer, for some reason its not getting executing ( might be the way i configured could be wrong)

    Here is my configuration
    <channel id="incomingMessageChannel" />

    <jms:outbound-channel-adapter id="jmsout"
    channel="incomingMessageChannel" destination-name="requestqueue">
    </jms:outbound-channel-adapter>

    <transformer input-channel="incomingMessageChannel"
    output-channel="bridgeChannel" ref="trans" method="transform">
    </transformer>
    <jms:message-driven-channel-adapter
    id="jmsin" destination-name="requestqueue"
    channel="bridgeChannel" />

    <channel id="bridgeChannel" />

    <jms:outbound-channel-adapter id="jmsinbound"
    channel="bridgeChannel" destination-name="responsequeue" />

    Thanks,
    Ben

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

    Default

    The way you have it configured now, any Message sent to the "incomingMessageChannel" will be sent in round-robin fashion to either the JMS outbound-gateway or the transformer. Also, the "message-driven" JMS adapter is an *inbound* adapter. So whatever channel it references will be receiving Messages via its JMS listener... whereas you have that channel listed as an outbound-channel on your bridge.

    So, I think it's mostly just a matter of getting your channels lined up in the right direction. If you are using the SpringSource Tool Suite, you can try the visual editor to see how the components and channels are connected.

  3. #3
    Join Date
    Jun 2011
    Posts
    29

    Default

    Thanks Mark, with the help of visual editor in STS I modified the diagram, Now i am getting the following error
    Cannot convert value of type [org.springframework.integration.jms.JmsMessageDriv enEndpoint] to required type [org.springframework.integration.MessageChannel] for property 'outputChannel': no matching editors or conversion strategy found

    Here is the configuration

    <channel id="incomingMessageChannel" />

    <jms:outbound-channel-adapter id="jmsout"
    channel="incomingMessageChannel" destination-name="requestqueue">
    </jms:outbound-channel-adapter>

    <transformer output-channel="jmsin" ref="trans" method="transform" input-channel="jmsout">
    </transformer>
    <jms:message-driven-channel-adapter
    id="jmsin" destination-name="requestqueue"
    channel="channel1" />

    <jms:outbound-channel-adapter id="jmsinbound"
    channel="channel1" destination-name="responsequeue" />
    <channel id="channel1"></channel>

  4. #4
    Join Date
    Jun 2011
    Posts
    29

    Default

    Thanks Mark, using STS integration graph it was really easy. Here is the configuration

    <channel id="incomingMessageChannel"/>
    <jms:message-driven-channel-adapter
    id="jmsin" destination-name="requestqueue"
    channel="incomingMessageChannel" />
    <jms:outbound-channel-adapter id="jmsinbound"
    channel="channel8" destination-name="responsequeue" />
    <transformer input-channel="incomingMessageChannel" ref="trans" output-channel="channel8"></transformer>
    <channel id="channel8"></channel>

Posting Permissions

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