0

I have a question about MSMQ. If I use a non-transactional queue and send message to it with recoverable parameter, message is stored on disc and in case of some problem secure. But if I want pull message from non-transactional queue, is there some mechanism to secure messages to stay in queue in case of some problem (server error, db off...)?

For some reasons I don't want to use transactional queue. Thanks a lot for response.

irudji
  • 229
  • 1
  • 3
  • 12

1 Answers1

0

You could implement a peek-then-receive process to simulate a transaction.

  1. Peek message to get content.
  2. Use the content as you wish.
  3. If step 2 completes then Receive message to effectively delete it.
  4. If step 2 fails, execute cleanup code and goto step 1.
John Breakwell
  • 4,667
  • 20
  • 25