Announcement Announcement Module
Collapse
No announcement yet.
Aggregator timeout Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Aggregator timeout

    Hi

    My aggregator was timing-out, which took me a little while to spot.

    Would it be useful if there were some way of defining an optional onTimeout method which is called after the timeout period? This would at least let me log an error.

    Paul

  • #2
    I like that idea. In fact, for 2.0 (where Aggregator is being refactored quite a bit), we could consider something like a TimeoutHandler with a handle(MessageGroup messagesReceivedPriorToTimeout). The default impl could still be based on the simple boolean flag for whether or not to send partial results on timeout.

    Does that make sense? If so, can you raise a JIRA request and provide a link to this thread?

    Thanks,
    Mark

    Comment


    • #3
      I don't completely see yet how discardChannel is inadequate in this use case. It would be great if you could elaborate on that a bit.

      Comment


      • #4
        I want to be able to do one thing in the event of a timeout, rather than n things, once per late message.

        In this case, neither a partial result nor the late messages are any use to me.

        Paul

        Comment


        • #5
          Originally posted by paul.mckenzie View Post
          I want to be able to do one thing in the event of a timeout, rather than n things, once per late message.

          In this case, neither a partial result nor the late messages are any use to me.
          That's very clear, thanks!

          Comment


          • #6
            Aggregator not timing out

            Hi,

            I have specified a timeout for my aggregator.
            I want the aggregator to discard the message if all messages are not recived within a specific timeout.
            I have specified a discard channel for it too.
            But my aggregator is not timing out.
            It works fine when there is a duplicate message.It redirects to the discard channel.

            My configuration is:

            <int-http:inbound-channel-adapter id="smsInboundAdapter"
            channel="smsChannel" name="/smsInboundAdapter.htm" supported-methods="GET" />

            <int:channel id="smsChannel" />

            <int:transformer id="smsToMessageConverter"
            input-channel="smsChannel" output-channel="aggregationChannel" >

            <bean class="sms.communication.SMSToMessageConverter" />
            </int:transformer>

            <int:channel id="aggregationChannel" />

            <int:channel id="errorChannel" />

            <int:aggregator method="add" input-channel="aggregationChannel"
            output-channel="completeMessageChannel"
            discard-channel="errorChannel" send-timeout="3" >
            <bean class="sms.communication.MessageAggragator" />
            </int:aggregator>


            <int:outbound-channel-adapter ref="errorUnWrapper"
            channel="errorChannel" />

            <int:channel id="completeMessageChannel" />

            <int:outbound-channel-adapter ref="messageProcessor"
            channel="completeMessageChannel" />

            <bean id="messageProcessor" class="sms.communication.MessageProcessor" />

            <bean id="errorUnWrapper" class="sms.communication.ErrorUnWrapper" />



            I am considering the send timeout value in milliseconds..


            Please help.
            Last edited by annuk; Jun 6th, 2011, 09:21 AM.

            Comment

            Working...
            X