Announcement Announcement Module
Collapse
No announcement yet.
deliver Message to MessageHandlers failed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • deliver Message to MessageHandlers failed

    Hi Guys,

    A kind of strange thing that I am having.

    I have a channel( say inputChannel) which hav two handlers say handlerA and handlerB.

    I have written a JUnit to send a message on the input channel and it sends them to handlers handlerA and handlerB as per round robin.

    The JUnit class send the message to the inputChannel with code like

    HTML Code:
    MessageChannel messageChannel = (MessageChannel)applicationContext.getBean("AdaptorChannelIn");
    When I run the JUnit using eclipse it runs fantastic , sending message to channel and gets prcoessed by handlerA or B.

    But when i run using command line as
    HTML Code:
    mvn test -Dtest=LoadBalancerTest
    Then it sends the message twice to inputChannel and there is stacktrace which says message could not be sent and on second trial message goes successfully. I have been scracthing my head for 3rd of day and cant figure out the bizzarre behaviour.

    Any clue will be appreciated. Attaching the test class. Please note that I have clear classes/jars/ project clean build and all. And message was received twice at the input channel.

    Error stack
    HTML Code:
    org.springframework.integration.dispatcher.AggregateMessageDeliveryException: All attempts to deliver Message to MessageHandlers failed.
            at org.springframework.integration.dispatcher.UnicastingDispatcher.handleExceptions(UnicastingDispatcher.java:143)
            at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:112)
            at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90)
            at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43)
      Exception while sending request for threadID : 0
      Exception while sending request for message : [Payload=request.PingRequest@f07355][Headers={springintegration_timestamp=1277562879770, springintegration_id=86de287d-bd42-480b-a738-5226bc9f4666}]
            at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
            at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94)
            at com.test.LoadBalancerTest$Client.sendMessage(LoadBalancerTest.java:159)
            at com.test.LoadBalancerTest$Client.run(LoadBalancerTest.java:128)
            at java.lang.Thread.run(Thread.java:619)
    there is no other error stack.

  • #2
    attached the code of test

    Comment

    Working...
    X