Announcement Announcement Module
No announcement yet.
Publish subscribe channel expecting a reply Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Publish subscribe channel expecting a reply

    A simple question,on a publish subscribe channel. I have an inbound gateway that expects a reply and have a pub-sub channel following it which publishes the message to multiple flows, each having a filter so that it only deals with the message it is interested in, processes it and responds back . I can understand that its not probably the best way to do it, but the reason we have to use it is because we may not know in advance who the subscribers would be. But I do know for sure that only one of the flows would respond back with a reply. When I say a flow, it means another file which has a service activator which has the pub-sub channel as input channel. Now my problem seems to be that if there are multiple components subscribed to the pub-sub channel, and first flow's filter accepts the message while the second one rejects, the reply never comes back to the gateway even though the first one has completed processing. Any ideas around this?


  • #2
    You might want to consider recipient-list-router instead of a publish-subscribe-channel in this case. You can use selector-expressions on each recipient - possibly meaning that this would be a relatively simple change.


    • #3
      Hi Mark,
      Thank you for the response. However, in the case of the recipent-list-router, wouldnt we need to know before hand the channel to route to? In our case the subscriber would not be known in advance. But the message itself could have the knowledge of whom to go to. We finally decided to input the message with a header key with the channel name and the used a header value router defined with only the header key so that the message would be sent to the correct flow which in a sense is a small example as a routing slip.

      Thank you for the response !