I have an orchestration which sends a message A to message box. Now I have 2 subscriber orchestrations which subscribe to the message based on a filter expressions.

Now when I send a message which is to be routed to Subscriber 1, everything works fine, but when a message for subscriber 2 is sent it is routed to destination folder but infinite copies are created in the destination folder. I have to stop the orchestration to stop the generation of duplicate copies of message.

What am I doing wrong?

有帮助吗?

解决方案 2

This is often a symptom of a feedback loop, i.e. where you have a situation like:

  • Implementing a receive port which listens to the location that a send port publishes messages.
  • Implementing a direct-bound orchestration with a send port configured to publish messages to the message box of the same schema that it receives (without any filtering)

This is especially common in direct bound (MessageBox) scenarios, as this doesn't have the additional filters which are applied with Specify Now / Later settings. The solution is usually to add an additional filter - either out of the box, such as BTS.ReceivePortName, or a custom context property) on subscribers, so that you can distinguish between messages which have already been processed.

其他提示

Are you receiving the same message that you are sending? If so this will cause an infinite loop because your receive location will pick the message up when it is sent. You need to change the filter on the receive, set a flag in your message in the orchestration and then filter on that perhaps.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top