Results 1 to 6 of 6

Thread: Aggregator timeout

  1. #1

    Default 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. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    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

  3. #3
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    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.

  4. #4

    Default

    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

  5. #5
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    Quote 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!

  6. #6
    Join Date
    May 2011
    Location
    Mumbai, India
    Posts
    93

    Post 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 at 08:21 AM.

Tags for this Thread

Posting Permissions

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