tags:

views:

177

answers:

2

Hi,

I'd like to be able to use duplex contract with MSMQ, does someone have any ideas to do that ? I've seen some blogs here and here, but it seems that their attempt (using duplex contracts over MSMQ using a:ReplyTo) has not successed.

Reliable session cannot help me because it doesn't garantee that the message will be sent when the network, or the reciever is down.

A: 

Sorry if this has already been ruled out (as this isn't exactly what you're looking for), but one way to achieve this would be to just setup separate NetMsmq service endpoints in each application. In the service method that needs to reply back to the caller, you would just create an MSMQ client pointing at the receiver's address and send a message back as usual.

If you want more dynamic behavior for the "ReplyTo" address, you could have the client pass in the address of it's service endpoint as part of the message going to the service. When the service needs to reply back, it could programatically create the client endpoint using the client's provided address in a NetMsmqBinding.

Andy White
Yes I've used ReplyTo, the GetCallbackChannel of your OperationContext use automatically the ReplyTo address specified in the header. But you have to enable ManualAddressing on the transport binding. I'm thinking about a clean solution (with behavior instead MessageContract) to handle my use case.
Nicolas Dorier
A: 

Here is my solution

Nicolas Dorier