QueueClient.Receive QueueClient.Receive QueueClient.Receive Method

Definition

Overloads

Receive() Receive() Receive()

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Receive(Int64) Receive(Int64) Receive(Int64)

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Receive(TimeSpan) Receive(TimeSpan) Receive(TimeSpan)

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

Receive() Receive() Receive()

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive ();
abstract member Receive : unit -> Microsoft.ServiceBus.Messaging.BrokeredMessage
override this.Receive : unit -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Function Receive () As BrokeredMessage
Returns

The BrokeredMessage that represents the received message. If no message is available to be received, the method returns NULL, and you can retry the operation at a later time.

Exceptions

Thrown if the message receive operation times out.

Thrown if the messaging entity associated with the operation does not exist or it has been deleted.

Thrown if the user code has performed some unexpected operations, or the Service Bus gateway is down. Check the exception message for the actual error.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, 
            or the operations succeeded but there are no more messages to be received.

Receive(Int64) Receive(Int64) Receive(Int64)

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive (long sequenceNumber);
abstract member Receive : int64 -> Microsoft.ServiceBus.Messaging.BrokeredMessage
override this.Receive : int64 -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Function Receive (sequenceNumber As Long) As BrokeredMessage
Parameters
sequenceNumber
Int64 Int64 Int64

The sequence number of the deferred message to receive.

Returns

The BrokeredMessage that represents the received message. If no message is available to be received, the method returns NULL, and you can retry the operation at a later time.

Exceptions

Remarks

A Null can be return by this API if operation exceeded the timeout specified, 
            or the operations succeeded but the message with the requested sequenceNumber cannot be located.

Receive(TimeSpan) Receive(TimeSpan) Receive(TimeSpan)

Receives a message using the Microsoft.ServiceBus.Messaging.QueueClient.InternalReceiver.

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive (TimeSpan serverWaitTime);
abstract member Receive : TimeSpan -> Microsoft.ServiceBus.Messaging.BrokeredMessage
override this.Receive : TimeSpan -> Microsoft.ServiceBus.Messaging.BrokeredMessage
Public Function Receive (serverWaitTime As TimeSpan) As BrokeredMessage
Parameters
serverWaitTime
TimeSpan TimeSpan TimeSpan

The time span the server waits for receiving a message before it times out.

Returns

The BrokeredMessage that represents the received message. If no message is available to be received, the method returns NULL, and you can retry the operation at a later time.

Exceptions

Thrown if the message receive operation times out.

Thrown if the messaging entity associated with the operation does not exist or it has been deleted.

Thrown if the user code has performed some unexpected operations, or the Service Bus gateway is down. Check the exception message for the actual error.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, 
            or the operations succeeded but there are no more messages to be received.

Applies to