what is rate limit for MS teams java bdk

Vaibhav-A Mankar 65 Reputation points
2023-02-16T07:09:07.64+00:00
what is rate limit for MS teams java bdk.

We are getting error, when we hit 50 request per sec.
Caused by: java.util.concurrent.CompletionException: com.microsoft.bot.connector.rest.ErrorResponseException: replyToActivity 

	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) [na:1.8.0_351] 

	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [na:1.8.0_351] 

	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:618) [na:1.8.0_351] 

	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:591) ~[na:1.8.0_351] 

	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488) [na:1.8.0_351] 

	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975) [na:1.8.0_351] 

	at retrofit2.CompletableFutureCallAdapterFactory$ResponseCallAdapter$2.onResponse(CompletableFutureCallAdapterFactory.java:119) ~[retrofit-2.5.0.jar!/:na] 

	at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129) ~[retrofit-2.5.0.jar!/:na] 

	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174) ~[okhttp-3.14.9.jar!/:na] 

	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) ~[okhttp-3.14.9.jar!/:na] 

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_351] 

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_351] 

	at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_351] 

Caused by: com.microsoft.bot.connector.rest.ErrorResponseException: replyToActivity 

	at com.microsoft.bot.connector.rest.RestConversations.lambda$replyToActivity$5(RestConversations.java:475) ~[bot-connector-4.14.2.jar!/:4.14.2] 

	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:616) [na:1.8.0_351] 

	... 10 common frames omitted
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,506 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. msft-im 0 Reputation points
    2023-04-20T20:38:21.8666667+00:00

    Thanks for posting in the Microsoft Q&A Community. Per the following documentation: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/rate-limit#per-bot-per-thread-limit
    "The global limit per app per tenant is 50 Requests Per Second (RPS). Hence, the total number of bot messages per second must not cross the thread limit." (i.e. Java BDK/SDK, etc ) Bot limit


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.