Announcement Announcement Module
Collapse
No announcement yet.
Messaging Gateway does not receive reply message Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Messaging Gateway does not receive reply message

    Currently I am using an SI snapshot from 20081017 (between M6 and RC1) and I try to migrate to SI 1.0.

    I am using the SimpleMessageGateway and call AbstractMessagingGateway.sendAndReceiveMessage(mes sage). Somehow I am NOT getting the reply message.

    Just trying to debug at the point where my endpoint returns the payload to the reply channel. Honestly I do not know where to look at. What I see is that the BroadcastingDispatcher from the reply channel (PublishSubscribeChannel) does not have any handler?!

    Is this a problem known to anybody?

  • #2
    I have created a simple exampe to reproduce the problem (see attache zip and start Demo main).

    My configuration:
    Code:
    	<poller id="poller" default="true">
    		<interval-trigger interval="1000"/>
    	</poller>
    
    	<publish-subscribe-channel id="requestChannel"/>
    	<channel id="aggregatorChannel"/>
    	<publish-subscribe-channel id="replyChannel"/>
    
    	<splitter id="splitterEndpoint" input-channel="requestChannel" output-channel="aggregatorChannel"
    		ref="splitter" method="split" />
    	<beans:bean id="splitter"
    		class="test.Split">
    	</beans:bean>
    	
    	<aggregator id="aggregator" input-channel="aggregatorChannel" output-channel="replyChannel"
    		ref="reply" method="process" />
    	<beans:bean id="reply"
    		class="test.Reply">
    	</beans:bean>
    My console shows that the aggregator returns the message but the gateway receives null (after a timeout of 5 secs):

    Code:
    INFO  SimpleTaskScheduler - started [email protected]8be
    Returning: [odd, even, even, odd]
    >>>null

    Comment


    • #3
      Can you provide the source for Demo.java?

      Comment


      • #4
        Ups. Here is the source.

        Comment


        • #5
          Sorry, I just noticed that you mentioned you are using a version between M6 and RC1. Is there any chance you can try this sample with 1.0 final?

          A bug was fixed for that should take care of this:
          http://jira.springframework.org/browse/INT-497

          Comment


          • #6
            I remember that I had this problem once some time ago. I think it has something to do with the splitter and aggregator I posted here: http://forum.springframework.org/showthread.php?t=60214
            I have created for this old post also an issue: http://jira.springframework.org/browse/INT-369

            Comment


            • #7
              Originally posted by Mark Fisher View Post
              Sorry, I just noticed that you mentioned you are using a version between M6 and RC1. Is there any chance you can try this sample with 1.0 final?

              A bug was fixed for that should take care of this:
              http://jira.springframework.org/browse/INT-497
              I am migrating this to 1.0 final and the attached example runs on final 1.0 to demonstrate the problem in this GA release.

              Comment


              • #8
                OK. You just need to add the following (in bold):
                Code:
                gateway.setReplyChannel(replyChannel);
                gateway.afterPropertiesSet();
                Message<?> reply = gateway.sendAndReceiveMessage(message);

                Comment


                • #9
                  THANKS Mark!!!! You just made my day! Do know when 1.0.1 will be available?

                  Comment


                  • #10
                    We're aiming to have 1.0.1 available sometime next week already. It will only be addressing a handful of issues.

                    Feel free to submit an issue for this one. We could add some lazy initialization so that afterPropertiesSet() is called automatically when used programmatically. Of course when the gateway is configured as a bean, this would not be an issue anyways.

                    Comment


                    • #11
                      Done: http://jira.springframework.org/browse/INT-507

                      Comment


                      • #12
                        I added a comment there and set the fix version to 1.0.1

                        Thanks,
                        Mark

                        Comment

                        Working...
                        X