I have an application that consumes messages from an MSMQ queue. The application uses MSMQ activation of a WCF service hosted in the IIS using AppFabric.
It is essential that the order of messages is preserved. But does MSMQ guarantee that the message order is preserved?
It seems to me, that if my application fails to process a message, e.g. because of a broken connection to the database, then the message is moved to the retry queue. This allows the application to receive new messages from the main queue until the original message is moved from the retry queue back to the main queue. After a certain number of retry intervals, the message is moved to the poison queue. But if the application processes new messages, then poison queue handling is simply not an option.
Thus the order of the messages has not been preserved.
Am I wrong in my understanding of how application errors are handled?
Can I setup the binding so that message order is preserved, also in the case when message processing temporarily fails?