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