SALES: 1-800-867-1380

SubscriptionClient.OnMessage Method

Processes a message in an event-driven message pump.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method OnMessage(Action<BrokeredMessage>) Processes a message in an event-driven message pump.
Public method OnMessage(Action<BrokeredMessage>, OnMessageOptions) Processes a message in an event-driven message pump, with the given set of OnMessageOptions options.
Top

When calling OnMessage(), the client starts an internal message pump that constantly polls the queue or subscription. This message pump consists of an infinite loop that issues a Receive() call. If the call times out, it issues the next Receive() call. The timeout is the value of the OperationTimeout property of the MessagingFactory that is used. The default value of this timeout is 60 seconds. You can modify the timeout by changing the OperationTimeout property before creating the MessagingFactory. Note that every receive operation is a billable event.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft