Announcement Announcement Module
No announcement yet.
question on RecipientListRouter/PublishSubscribe Channel Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • question on RecipientListRouter/PublishSubscribe Channel


    I'm currently implementing a Scatter-Gather usecase.
    To do so, I've got two options:
    - using a RecipientListRouter,
    - using a Publish/Subscribe Channel.

    However, while the Publish/Subscribe Channel allows to add automatically the message's headers SequenceNumber and SequenceSize, the RecipientListRouter do not.
    May I suggest to add this feature to the RecipientListRouter?

    Moreover, if I understand the purpose of the attribute apply-sequence on the element publish-subscribe, it gives the possibility to use a aggregator after. But if the correlationId is not present, the aggregator throws a MessagHandlingException. So may I suggest to generate a correlationId if none exists with the attribute apply-sequence too?

    Finally, I've got a stupid question: I understood that the semantic of a PublishSubscribe Channel (or RecipientListRouter) is to send the same message to different channel but with the attribute appy-sequence, the header is different as the sequenceNumber is different. Don't you think that it could cause misunderstood?

    Hope my questions are clear enough and sorry for my english.

    Best Regards,


  • #2
    Is there a reason that you are preferring to use the recipient-list router over a publish-subscribe-channel?

    To answer your last question... the Messages that are sent when "apply-sequence" is TRUE, cannot be exactly the same - *because of* the different header values. That's the reason that we do not have a default value of TRUE... the flag should only be enabled when you do want to have a downstream Aggregator. Otherwise, when it is FALSE, the exact same Message is sent to all subscribers.


    • #3
      Hi Mark,

      Thank you for your response.
      In fact, I have to implement a Scatter-Gather usecase and I am trying to show how it could be implemented. In the book of G. Hohpe and B. Woolf, it can be done either with a Recipient List or with a Publish Subscribe Channel according to where the knowledge of recipients is.
      So in my implementations, I am trying to be exhaustive and to show how it could be done.
      This is why I think that if the PublishSubscribe Channel can add properties, the RecipientList should too. What do you think about?

      And what do you think about adding the correlationId with the apply-sequence?

      Thanks in advance.
      Best Regards,



      • #4
        Could you please add two issues via JIRA:
        1. add correlationId header when applying sequence with publish-subscribe-channel
        2. add "apply-sequence" boolean flag to RecipientListRouter



        • #5
          Thanks Mark.
          Two issues have been opened :

          Best regards,



          • #6
            The publish-subscribe-channel version should work as of now (with the SVN head version). I just resolved INT-678. Please try it out if you get a chance.


            • #7
              Hi Mark,

              i just tested your evolution from trunk and everything seems great. Moreover the new element recipient-list-router is a good idea!
              Thanks a lot!

              Here is the tested code for interested developpers
              	<recipient-list-router id="recipientListRouter" input-channel="requestChannel" ignore-send-failures="true" apply-sequence="true">
              		<recipient channel="recipientListToBE1"/>
              		<recipient channel="recipientListToBE2"/>
              		<recipient channel="recipientListToBE3"/>