

Training Courses


Deferring Messages

The BrokeredMessage class provides a Defer method that can be used by applications receiving messages from queues and subscriptions to defer the processing of a message until some later point in time. Deferring messages allows receiving applications to prioritize the processing of high priority messages and defer the processing of lower priority messages.

In order for a message to be deferred it must have been received using the PeekLock message mode, and not have been completed or abandoned. Once a message is deferred it can only be received again using the SequenceNumber value for the message. The receiving application must retrieve this value from the message and store it before the message is deferred. If the SequenceNumber for a deferred message is lost the deferred message will remain in the queue until it expires. The receiving application is responsible for the reliable storage of SequenceNumbers for messages it has deferred.

Speaking Engagements