views:

232

answers:

2

Has anyone got any pointers on good practices / potential designs for handling the situation in a BizTalk orchestration were the response from a long-running service has failed, so the initiation message needs to be resent

I have the situation where an orchestration is sending a message to an MSMQ queue and then waiting on a response back on another queue. Now the response time should be less than a minute, but the "service" on the other end of the queue is occasionally failing ...
and it's not something I have any control over, so I can't change/correct it

Is there some design pattern that I can use in BizTalk to timeout and resend the initiating message ?

+1  A: 

standard BPEL defines a "Pick" activity and BizTalk has "Listen" shape for that so you can basically define a timeout period for your receiving activity on the reply queue after that, you might want a boolean flag to decide whether to loop back/retry or the receive is successful and therefore the business process continues on.

A: 
  1. Define a single orchestration which can used to retry sending messages, these messages which are to be placed in the queue are picked up from the message box.

  2. If the response from the response queue is getting delayed, use the singleton loop to resent the message.

Side note: You might have to enable Delivery Notification property on your send port, just to listen to any exceptions you might have.

Refer to the article...

Handling Exceptions in BizTalk Orchestrations

Naveen Karamchetti