Stopping message at Pipeline component

Hi all,

I have a message and I am checking if the file size is more than 4 MB, the files should be  routed back in a email. 

If it is less than 4 MB, it should be processed further with orchestration.

Now i have written the code and working fine, I am just not sure if I can return a null pINMsg incase size is more than 4 MB. As of now I thought of constructing a null data message with only namespace and reject it in the orchestration.

Is there any other way to ignore the 4 MB message in the pipeline ??

Thanks,

February 24th, 2015 9:41am

You can return Null in place of the Message, but then nothing will be routed anywhere.  The Messaging Agent will silently ignore the message.

I don't think you can set the Body data part stream to Null, though I have never actually tried.

You can definitely set the data part to an empty stream.  That will get you the desired behavior.

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2015 9:48am

Hi Varun,

If you look closer to your requirement, its not stopping the message if its more than 4MB. Its actually

If the message size is greater than 4 MB, then send email with received file as attachment

Else send/process the message in an Orchestration.

For this requirement, you can do the following:

  • Create a custom pipeline component use it in Receive Location. In the component check the size of the received message as you do now. If its lesser than 4 MB proceed with it by publishing the message to message Box where your Orchestration will subscribe the published message.
  • Again in the same custom receive pipeline component, If the message size is greater than 4 MB, then store the received message to a local drives (or shared drive) folder. Dont publish the >4MB message, but construct a trigger-like message which contains the path where the received file is saved. Publish this trigger-like message into message Box in the case of <4 MB.
  • Have a send port with filter for message type of the trigger-like message. In the send port, use another custom send pipeline with a pipeline component which will receive the trigger message (which would have been published into msgbox in case of >4MB). Retrieve the URL/path for the saved <4MB file construct an email message and with the >4 MB file from local/shared drive as attachment.

With this design, your requirement is satisfied also you have not published the >4MB file into BizTalk message box.

Regards,

M.R.Ashwin Prabhu

February 24th, 2015 11:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics