Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

MessageQueue.ReceiveById Method

Receives the message that matches the given identifier, removing it from the queue.

Overload List

Receives the message that matches the given identifier from a non-transactional queue, and immediately raises an exception if no message with the specified identifier currently exists in the queue.

[Visual Basic] Overloads Public Function ReceiveById(String) As Message
[C#] public Message ReceiveById(string);
[C++] public: Message* ReceiveById(String*);
[JScript] public function ReceiveById(String) : Message;

Receives the message that matches the given identifier, from a transactional queue, and immediately raises an exception if no message with the specified identifier currently exists in the queue.

[Visual Basic] Overloads Public Function ReceiveById(String, MessageQueueTransaction) As Message
[C#] public Message ReceiveById(string, MessageQueueTransaction);
[C++] public: Message* ReceiveById(String*, MessageQueueTransaction*);
[JScript] public function ReceiveById(String, MessageQueueTransaction) : Message;

Receives the message that matches the given identifier, and immediately raises an exception if no message with the specified identifier currently exists in the queue.

[Visual Basic] Overloads Public Function ReceiveById(String, MessageQueueTransactionType) As Message
[C#] public Message ReceiveById(string, MessageQueueTransactionType);
[C++] public: Message* ReceiveById(String*, MessageQueueTransactionType);
[JScript] public function ReceiveById(String, MessageQueueTransactionType) : Message;

Receives the message that matches the given identifier, from a nontransactional queue, and waits until either a message with the specified identifier is available in the queue or the time-out expires.

[Visual Basic] Overloads Public Function ReceiveById(String, TimeSpan) As Message
[C#] public Message ReceiveById(string, TimeSpan);
[C++] public: Message* ReceiveById(String*, TimeSpan);
[JScript] public function ReceiveById(String, TimeSpan) : Message;

Receives the message that matches the given identifier, from a transactional queue, and waits until either a message with the specified identifier is available in the queue or the time-out expires.

[Visual Basic] Overloads Public Function ReceiveById(String, TimeSpan, MessageQueueTransaction) As Message
[C#] public Message ReceiveById(string, TimeSpan, MessageQueueTransaction);
[C++] public: Message* ReceiveById(String*, TimeSpan, MessageQueueTransaction*);
[JScript] public function ReceiveById(String, TimeSpan, MessageQueueTransaction) : Message;

Receives the message that matches the given identifier, and waits until either a message with the specified identifier is available in the queue or the time-out expires.

[Visual Basic] Overloads Public Function ReceiveById(String, TimeSpan, MessageQueueTransactionType) As Message
[C#] public Message ReceiveById(string, TimeSpan, MessageQueueTransactionType);
[C++] public: Message* ReceiveById(String*, TimeSpan, MessageQueueTransactionType);
[JScript] public function ReceiveById(String, TimeSpan, MessageQueueTransactionType) : Message;

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.