Announcement Announcement Module
No announcement yet.
deliver Message to MessageHandlers failed Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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(
            at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(
            at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(
      Exception while sending request for threadID : 0
      Exception while sending request for message : [[email protected]][Headers={springintegration_timestamp=1277562879770, springintegration_id=86de287d-bd42-480b-a738-5226bc9f4666}]
            at com.test.LoadBalancerTest$Client.sendMessage(
            at com.test.LoadBalancerTest$
    there is no other error stack.

  • #2
    attached the code of test