tags:

views:

110

answers:

1

I am shortly starting a project, which requires messages to be held in a queue for a period of 24 hours, this is because the database can't have any updates at certain times of the month. The service also has to be hosted on windows server 2003, which means it will have to be a windows service.

It is also required that the service use WCF so that in 12 months time when we move over to windows server 2008, the service can hosted in iis 7. At present I am wondering if MSMQ is the best way to handle this.

I've been looking into topics like poison message handling & dead letter queues, but nothing that really covers what I am intending to actually do. Could anyone recommend a sample or a tutorial for this ?

Thanks in advance

+1  A: 

Yes, it sounds like this is a perfect scenario for WCF and MSMQ. It should be much easier to use MSMQ than to create your own queuing mechanism with the same robustness. You will want to look into the Message.TimeToBeReceived Property for a message expiring timeout.

If the interval specified by the TimeToBeReceived property expires before the message is removed from the queue, Message Queuing discards the message in one of two ways. If the message's UseDeadLetterQueue property is true, the message is sent to the dead-letter queue. If UseDeadLetterQueue is false, the message is ignored.

Here are some good starter tutorials on WCF with MSMQ: link1 and link2

Matt Dearing
Thanks for the links, and the assurance I'm heading down the right path.
Miker169