Skip to content

core: worker: retry if the queue doesn't exist when ALL_INFRA is set#16726

Draft
eckter wants to merge 1 commit into
devfrom
ech/wait-for-queue-creation
Draft

core: worker: retry if the queue doesn't exist when ALL_INFRA is set#16726
eckter wants to merge 1 commit into
devfrom
ech/wait-for-queue-creation

Conversation

@eckter
Copy link
Copy Markdown
Contributor

@eckter eckter commented May 13, 2026

Sometimes, especially when the queues haven't been used in a while, starting a core worker can result in an error where it doesn't seem to find the queue. In can be annoying when running core outside of docker compose, as it doesn't restart automatically. We generally need to put messages in the queue before starting the core process.

The error is com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'core-req-all'

This PR adds a simple retry mechanism when core is running in ALL_INFRA. Otherwise we can rely on osrdyne to restart the worker anyway.

But I realized when testing the fix that I don't entirely understand why it fails. Deleting the queue manually leads to entirely different results than waiting for a while without message, it isn't recreated automatically. It seems that the queue isn't actually deleted. I'm also surprised in that it only seem to need a single retry, the second attempt generally works.

This PR would still be an improvement but there might be a better solution, I'd like to discuss this a bit further.

The fact that I haven't found a way to reproduce without waiting for ~15 minutes makes it a bit difficult to test.

Signed-off-by: Eloi Charpentier <eloi.charpentier.42@gmail.com>
@github-actions github-actions Bot added the area:core Work on Core Service label May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core Work on Core Service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant