ServiceBusClient.GetMessageSessionsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetMessageSessionsAsync(String, CancellationToken) |
Lists the IDs of sessions that have active messages or session state in a session-enabled queue. |
| GetMessageSessionsAsync(String, DateTimeOffset, CancellationToken) |
Lists the IDs of sessions whose session state was set or updated after the specified time in a session-enabled queue. |
| GetMessageSessionsAsync(String, String, CancellationToken) |
Lists the IDs of sessions that have active messages or session state in a session-enabled subscription. |
| GetMessageSessionsAsync(String, String, DateTimeOffset, CancellationToken) |
Lists the IDs of sessions whose session state was set or updated after the specified time in a session-enabled subscription. |
GetMessageSessionsAsync(String, CancellationToken)
- Source:
- ServiceBusClient.cs
Lists the IDs of sessions that have active messages or session state in a session-enabled queue.
public virtual System.Collections.Generic.IAsyncEnumerable<string> GetMessageSessionsAsync(string queueName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessageSessionsAsync : string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
override this.GetMessageSessionsAsync : string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
Public Overridable Function GetMessageSessionsAsync (queueName As String, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of String)
Parameters
- queueName
- String
The name of the session-enabled queue.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
An IAsyncEnumerable<T> of session ID strings that can be iterated with await foreach.
Applies to
GetMessageSessionsAsync(String, DateTimeOffset, CancellationToken)
- Source:
- ServiceBusClient.cs
Lists the IDs of sessions whose session state was set or updated after the specified time in a session-enabled queue.
public virtual System.Collections.Generic.IAsyncEnumerable<string> GetMessageSessionsAsync(string queueName, DateTimeOffset sessionStateUpdatedAfter, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessageSessionsAsync : string * DateTimeOffset * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
override this.GetMessageSessionsAsync : string * DateTimeOffset * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
Public Overridable Function GetMessageSessionsAsync (queueName As String, sessionStateUpdatedAfter As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of String)
Parameters
- queueName
- String
The name of the session-enabled queue.
- sessionStateUpdatedAfter
- DateTimeOffset
Only sessions whose session state was set or updated after this time are returned.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
An IAsyncEnumerable<T> of session ID strings that can be iterated with await foreach.
Applies to
GetMessageSessionsAsync(String, String, CancellationToken)
- Source:
- ServiceBusClient.cs
Lists the IDs of sessions that have active messages or session state in a session-enabled subscription.
public virtual System.Collections.Generic.IAsyncEnumerable<string> GetMessageSessionsAsync(string topicName, string subscriptionName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessageSessionsAsync : string * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
override this.GetMessageSessionsAsync : string * string * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
Public Overridable Function GetMessageSessionsAsync (topicName As String, subscriptionName As String, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of String)
Parameters
- topicName
- String
The name of the topic.
- subscriptionName
- String
The name of the subscription.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
An IAsyncEnumerable<T> of session ID strings that can be iterated with await foreach.
Applies to
GetMessageSessionsAsync(String, String, DateTimeOffset, CancellationToken)
- Source:
- ServiceBusClient.cs
Lists the IDs of sessions whose session state was set or updated after the specified time in a session-enabled subscription.
public virtual System.Collections.Generic.IAsyncEnumerable<string> GetMessageSessionsAsync(string topicName, string subscriptionName, DateTimeOffset sessionStateUpdatedAfter, System.Threading.CancellationToken cancellationToken = default);
abstract member GetMessageSessionsAsync : string * string * DateTimeOffset * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
override this.GetMessageSessionsAsync : string * string * DateTimeOffset * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<string>
Public Overridable Function GetMessageSessionsAsync (topicName As String, subscriptionName As String, sessionStateUpdatedAfter As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of String)
Parameters
- topicName
- String
The name of the topic.
- subscriptionName
- String
The name of the subscription.
- sessionStateUpdatedAfter
- DateTimeOffset
Only sessions whose session state was set or updated after this time are returned.
- cancellationToken
- CancellationToken
An optional CancellationToken instance to signal the request to cancel the operation.
Returns
An IAsyncEnumerable<T> of session ID strings that can be iterated with await foreach.