SALES: 1-800-867-1380

MessageSession.OnTryReceive Method (TrackingContext, IEnumerable<Int64>, TimeSpan, IEnumerable<BrokeredMessage>)

Attempts a message receive operation.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

protected override bool OnTryReceive(
	TrackingContext trackingContext,
	IEnumerable<long> receipts,
	TimeSpan timeout,
	out IEnumerable<BrokeredMessage> messages
)

Parameters

trackingContext
Type: Microsoft.ServiceBus.Tracing.TrackingContext
The context information associated by a transaction tracking this operation.
receipts
Type: System.Collections.Generic.IEnumerable<Int64>
The collection of unique numbers assigned to messages by the Service Bus.
timeout
Type: System.TimeSpan
The time span interval the operation waits before it times out.
messages
Type: System.Collections.Generic.IEnumerable<BrokeredMessage>
A collection of BrokeredMessage objects.

Return Value

Type: System.Boolean
true if the receive operation was successful; otherwise, false.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft