2

Is it possible to stop a receive pipeline from publishing a message to messagebox.

I've developed a pipeline component to check validity of the input message. I want to add code to stop the message getting published to messagebox if validation fails.

Simply to say if the input file fails the validation it should not invoke any orchestration or sendport. Also I've to send a mail publishing the details of the error from receive pipeline.

Thanks.

Riri
  • 11,501
  • 14
  • 63
  • 88
netShree
  • 35
  • 3

1 Answers1

6

One way to achieve your goal and to get a more dynamic and flexible solution is to utilize Failed Message Routing.

Within you validation code in your pipeline you can then add some suitable properties from the ErrorReport namespace (say for example a description and an failure code) when a validation of a message fails.

You can then have your existing orchestrations and send ports only subscribe to messages that don't have a failure code. Finally you'll create an orchestration that subscribes to messages with an existing failure code and send your email from that orchestration.

Riri
  • 11,501
  • 14
  • 63
  • 88