Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidying of queued messages #2869

Closed
adamcooke opened this issue Mar 12, 2024 · 0 comments · Fixed by #2872
Closed

Tidying of queued messages #2869

adamcooke opened this issue Mar 12, 2024 · 0 comments · Fixed by #2872

Comments

@adamcooke
Copy link
Contributor

adamcooke commented Mar 12, 2024

There are occasions when the queued messages table can have data within it which cannot be processed.

  1. A queued message is locked but not removed from the queue (usually occurs when there's a database issue during processing.)

  2. The messages associated with a queued message is no longer available which means they cannot be displayed in the web UI.


To improve this situation, we need to add a system for tidying queued messages which have been locked for a period of time which suggests they will not be unlocked. When we find stale locks we can either DELETE the queued message (so it is not retried automatically) or UNLOCK the queued message (so it can be retried again).

We need to be careful not to UNLOCK messages which might have been sent to HTTP or SMTP endpoints. We don't want to send messages twice erroneously.

Initially, I think DELETE-ing these messages will be safest. We can move to a model where we try to keep track of which stage a message de-queueing has reach and only UNLOCK if it has not reached the senders.

Additionally, as part of this, we should ensure the web UI can render the message queue when the backend message has been deleted. This is rare and, even more rare with the above in place, but it's worth just making sure it's resilient to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant