RemoveCurrent Method

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.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

NameDescription
System_CAPS_pubmethodRemoveCurrent()

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.

System_CAPS_pubmethodRemoveCurrent(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.

System_CAPS_pubmethodRemoveCurrent(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.

System_CAPS_pubmethodRemoveCurrent(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.

System_CAPS_pubmethodRemoveCurrent(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.

System_CAPS_pubmethodRemoveCurrent(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.

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.

Return to top
Show:
© 2016 Microsoft