Export (0) Print
Expand All

MessageEnumerator.RemoveCurrent Method

Removes the current message from the queue and returns the message to the calling application. Removing the message deletes it from the queue.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method RemoveCurrent() Removes the current message from a transactional or non-transactional queue and returns the message to the calling application. There is no timeout specified for a message to arrive in the queue.
Public method RemoveCurrent(MessageQueueTransaction) Removes the current message from a transactional queue and returns the message to the calling application. There is no timeout specified for a message to arrive in the queue.
Public method RemoveCurrent(MessageQueueTransactionType) Removes the current message from a queue and returns the message to the calling application. There is no timeout specified for a message to arrive in the queue.
Public method RemoveCurrent(TimeSpan) Removes the current message from the queue and returns the message to the calling application. If there is a message to remove, the method returns it immediately. Otherwise, the method waits the specified timeout for a new message to arrive.
Public method RemoveCurrent(TimeSpan, MessageQueueTransaction) Removes the current message from a transactional queue and returns the message to the calling application. If there is a message to remove, the method returns it immediately. Otherwise, the method waits the specified timeout for a new message to arrive.
Public method RemoveCurrent(TimeSpan, MessageQueueTransactionType) Removes the current message from a queue and returns the message to the calling application. If there is a message to remove, the method returns it immediately. Otherwise, the method waits the specified timeout for a new message to arrive.
Top

The behavior described for these overloads is applicable only if the MessageEnumerator instance is retrieved by using the GetMessageEnumerator2. Do not use GetMessageEnumerator to retrieve an instance of MessageEnumerator as this method has been deprecated.

Show:
© 2014 Microsoft