POC of queue to store events from MSTeams #598
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a POC in draft of storing things in a queue inside mattermost.
The idea is, each event get stored in the databases, if the even gets processed right away, we delete it from the queue.
In the future I will add a pooling mechanism that is going to try again up to 5 times each element in the queue that has more than 0 tries, and we start trying to deliver everything that is in the queue.
This would allow us to provide a more resilient event handling. My main concern here is the performance impact, I think we have space to reduce the database load, but I'm not sure how much.
Probably would be cool to have a load test with this code to figure out the degree of impact on the database.