SubscriptionClient.Receive SubscriptionClient.Receive Method

Definition

Overloads

Receive() Receive()

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

Receive(Int64) Receive(Int64)

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

Receive(TimeSpan) Receive(TimeSpan)

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

Receive() Receive()

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

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive ();
Public Function Receive () As BrokeredMessage
Returns

The BrokeredMessage that represents the received message.

Exceptions

Thrown when the subscription does not exist.

Thrown if the operation exceeded the timeout value set via OperationTimeout.

Thrown if the client entity has been closed or aborted.

Thrown if there is an authentication error.

Remarks

e 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)

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

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive (long sequenceNumber);
Public Function Receive (sequenceNumber As Long) As BrokeredMessage
Parameters
sequenceNumber
Int64 Int64

The sequence number of the deferred message to receive.

Returns

The BrokeredMessage that represents the received message.

Exceptions

Thrown if the client entity has been closed or aborted.

Remarks

e 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)

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

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive (TimeSpan serverWaitTime);
Public Function Receive (serverWaitTime As TimeSpan) As BrokeredMessage
Parameters
serverWaitTime
TimeSpan TimeSpan

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

Returns

The BrokeredMessage that represents the received message.

Exceptions

Thrown when the subscription does not exist.

Thrown if the client entity has been closed or aborted.

Thrown if the operation exceeded the timeout value set via OperationTimeout.

Thrown if there is an authentication error.

Remarks

e 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