finos / spring-bot

Spring Boot + Java Integration for Symphony/Teams Chat Platform Bots and Apps
https://springbot.finos.org
Apache License 2.0
60 stars 35 forks source link

MS Teams SDK API throw 429 exception if more than 50/sec reach #378

Closed vaibhav-db closed 1 year ago

vaibhav-db commented 1 year ago

MS Teams SDK API throw 429 exception if more than 50/sec reach. This default microsoft rate limit on post messages on channel. We need to handle it.

Solution: Use queue to capture this exception and after some time retry the messages.

vaibhav-db commented 1 year ago

We have created MessageRetryHandler, by default it will memory message retry handler. Which used the ConcurrentLinkedQueue to store and retry the message. We have create one cron job, while will be execute on every 30 sec and check the queue. If queue message time pass the retry time then these messages will resend.

robmoffat commented 1 year ago

can you take a look at my comments on https://github.com/finos/spring-bot/pull/376