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

Restart RabbitMQ consumers when vital queue got no consumers #1358

Closed
quantranhong1999 opened this issue Dec 3, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@quantranhong1999
Copy link
Member

Why

Today, there were no consumers on deleted-message-vault-work-queue of MU, so we needed to restart TMail ourselves.

We should have a mechanism to automatically spot the no consumers issues and restart them.

Originally it seems @chibenwa thought about writing a healthcheck for RabbitMQ consumers on the queues + auto restart TMail.

However, I checked the code and got another simple idea.

How

DoD

  • Test the ScheduledReconnectionHandler more to ensure it can correctly restart the consumers if a queue in the list has no consumer.
@chibenwa chibenwa added the bug Something isn't working label Dec 3, 2024
@chibenwa
Copy link
Member

chibenwa commented Dec 3, 2024

Deleted Message Vault may be disabled.

However the list of queues is static. We need to make sure queue consumption still runs if ScheduledReconnectionHandler has queue configured that do not exist

(write explicit tests for it, passing abc-i-do-not-exist as a queue in tests?)

@quantranhong1999
Copy link
Member Author

(write explicit tests for it, passing abc-i-do-not-exist as a queue in tests?)

+1

However the list of queues is static.

We can make the list configurable.

@quantranhong1999 quantranhong1999 self-assigned this Dec 4, 2024
@quantranhong1999
Copy link
Member Author

Likely we need a ScheduledReconnectionHandler implementation for deleted message vault work queue on James side.

@chibenwa
Copy link
Member

chibenwa commented Dec 4, 2024

No my feeling is that by handling the missing queue leniently we could keep this sttatic, just monitor the queue that exist and keep the configuration burdown low.

@chibenwa
Copy link
Member

chibenwa commented Dec 4, 2024

I'm against conf for this: it will get forgotten. The alternative would be to link it with the module chooser but it looks complex...

@quantranhong1999
Copy link
Member Author

Likely we need a ScheduledReconnectionHandler implementation for deleted message vault work queue on James side.

apache/james-project#2546

(write explicit tests for it, passing abc-i-do-not-exist as a queue in tests?)

#1366

@Arsnael Arsnael closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants