Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

QueueClient.GetMessageSessions Method

Gets the message sessions, enabling you to browse sessions on queues.

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 GetMessageSessions() Gets the message sessions, enabling you to browse sessions on queues.
Public method GetMessageSessions(DateTime) Retrieves all message sessions whose session state was updated since lastUpdatedTime.
Top

GetMessageSessions() enables you to view available sessions without locking or receiving. Browsed sessions can be locked by other consumers, and the browse request will not return locked sessions.

QueueClient queueClient = QueueClient.Create("myQ");
IEnumerable<MessageSession> allSessions = queueClient.GetMessageSessions();
IEnumerable<MessageSession> newSessions = queueClient.GetMessageSessions(
   DateTime.Now.Subtract(TimeSpan.FromMinutes(5)));
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.