您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

MessageReceiver.Receive Method

Definition

Overloads

Receive()

Receives a BrokeredMessage from the current queue or topic.

Receive(Int64)

Receives a message from the current queue or topic.

Receive(TimeSpan)

Receives a BrokeredMessage from the current queue or topic.

Receive()

Receives a BrokeredMessage from the current queue or topic.

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive ();
Returns

The BrokeredMessage that represents the received message.

Remarks

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

Receive(Int64)

Receives a message from the current queue or topic.

public Microsoft.ServiceBus.Messaging.BrokeredMessage Receive (long sequenceNumber);
Parameters
sequenceNumber
Int64

The sequence number of the message to receive.

Returns

The BrokeredMessage that represents the received message.

Remarks

A Null can be returned 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)

Receives a BrokeredMessage from the current queue or topic.

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

The time span the server waits before the operation times out.

Returns

The BrokeredMessage that represents the received message.

Remarks

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

Applies to