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

  • EIP Delayer

    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,

  • #2
    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
      EIP Delayer


      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.



      • #4

        The delayer is something like Any tip will be of great help, because the volume of processing is large.



        • #5
          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:


          • #6
            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.