Results 1 to 6 of 6

Thread: EIP Delayer

  1. #1

    Default EIP Delayer

    Hi,
    I am new in spring integration and need to implement the pattern Delayer noted in Enterprise Integration Patterns, as exists in Camel
    Please, any suggestions ???

    Best regards,
    Anderson

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    Sorry, but there is no "Delayer" pattern mentioned in the Enterprise Integration Patterns book. The closest thing I am aware of is a "DelayedProcessor" class that is used to simulate differences in processing time for the Resequencer example.

    Can you describe your use case?

  3. #3

    Default EIP Delayer

    Mark,

    Firstly thanks for the quick response. In my case I have an Activator Service that will connect to a site of the government to send some tax information via an SSL channel. By law, if the site or the intranet of the client is unavailable, I must wait a period of not less than the previously established, and try again for a number of times (previously established too).
    There is also a situation where the network is ok, on both sides, but the government is still processing and the service will return an error code and have to perform the routine described above.

    Thanks,
    Anderson

  4. #4

    Default

    Guys,

    The delayer is something like http://activemq.apache.org/camel/delayer.html. Any tip will be of great help, because the volume of processing is large.

    Thanks,
    Anderson

  5. #5
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    There is a subtle difference, but have you looked at the Messaging Bridge (and the 'bridge' element)?

    You can specify a poller with its own interval and importantly the 'max-messages-per-poll' attribute.

    See the Reference Documentation for more detail:
    http://static.springframework.org/sp...ce.html#bridge

  6. #6
    Join Date
    Oct 2007
    Location
    London, England
    Posts
    108

    Default

    This is not 100% straight forward but possible with a custom channel.

    To get the delay before delivery you could extend QueueChannel and have it backed by a java.util.concurrent.DelayQueue or implement MessageChannel from the public API.

    You can use the header-enricher to set the error-channel prior to delivery to the delay queue. This will control where the message is routed in the case that the service activator fails.

    An interceptor on the error channel could be used to increment a redelivery count. A router can then be connected to the error channel which can then reroute back to the delayed channel or the dead letter queue on the basis of the count.

    This is maybe something we should look at making easier in the future. Maybe you want to add something to JIRA.
    Jonas Partner
    OpenCredo

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
  •