Skip to content

[QUERY] Clarification on Communication Services (Chat) rate limits and SDK usage #45816

Open
@ErikAndreas

Description

@ErikAndreas

Library name and version

Azure.Communication.Chat 1.3.0

Query/Question

Using AsyncPageable<ChatMessage> messages = chatThreadClient.GetMessagesAsync() (and await'ing a foreach over messages) causes the underlying SDK to make several REST api calls to the service (number of messages / pageSize) - are each of these requests included in the service rate limits (as described at https://learn.microsoft.com/en-us/azure/communication-services/concepts/service-limits#rate-limits-1)?

It seems it is not possible to set the pageSize if requesting .AsPages() (the following has no effect)

AsyncPageable<ChatMessage> messages = chatThreadClient.GetMessagesAsync();
await foreach (var page in messages.AsPages(pageSizeHint: 10))

and the pageSize seems to be fixed at 6 - this would quickly exhaust the rate limits if each underlying page request is counted in the rate limit? https://learn.microsoft.com/en-us/azure/communication-services/concepts/service-limits#size-limits-1 states 200 as limit for "Page size - ListMessages" which could (should?) be interpreted as it is at least possible to set a page size in this context?

e.g., if there are 50 messages in a thread, calling

AsyncPageable<ChatMessage> messages = chatThreadClient.GetMessagesAsync();
await foreach (var m in messages)

would actually mean 9 calls have been made (50/6 = 9) and counted to the service limit rate for list chat messages on that thread?

Environment

azure functions in azure on dotnet-isolated-8

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Communication - ChatService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions