tags:

views:

209

answers:

2

Hi,

There's a requirement to persist messages that are generated between a WCF client and a WSE 2.0 web service. Since the web service is hosted by a third-party, could i implement a solution where the WCF client persists messages to msmq and have the windows service poll the queue intermittently for requests to be sent on the WSE 2.0 webservice? In the event of an unsuccessful request the message would remain on the queue.

Thanks in advance.

A: 

It should work.

The part that can be a bit tricky is when you read the data out of the MSMQ and send it to WSE 2.0 service.

  • Start a transaction
  • read the item out of MSMQ
  • Send it to WSE service
  • If WSE service returned OK, commit the transaction
Shiraz Bhaiji
A: 

by default MSMQ will not retain messages in queue if MSMQ service is restarted. if you want the messages to remain in MSMQ even if machine restarts etc.. you need to create queue as transactional(that is true if you use express messages which is default in .NET, thanks to Igal for correcting this).

Numenor
This is wrong. non transactional messages can be persistent or express messages. If they are express messages then you are right. If thay are persistent then they will, well, persist in the queue even in case of restarts. The default message object in .net is express and this probably leads to this wrong assumption.
Igal Serban
i forgot about that, corrected my answer according to Igal's comment.
Numenor