Skip to content

Fix flushing of RabbitMQ queues#687

Merged
Bogdanp merged 1 commit intoBogdanp:masterfrom
olii:master
Mar 30, 2025
Merged

Fix flushing of RabbitMQ queues#687
Bogdanp merged 1 commit intoBogdanp:masterfrom
olii:master

Conversation

@olii
Copy link
Copy Markdown
Contributor

@olii olii commented Mar 17, 2025

This PR fixes a bug when queues on the broker are flushed.

The old behavior was incorrect. It didn't flush delayed queues ending with .DQ and .XQ because the main queue was in the self.queues_pending variable (e.g. undeclared yet). We will have to ensure queues exist by declaring them first.

The new behavior doesn't require queues to be declared. If the purge fails and the RabbitMQ server closes the channel, it is recreated again, and the flushing continues.

This PR doesn't come with tests. I was not able to find them for the existing code. Based on that I didn't initiate the discussion as this is only useful in dev/tests environment.

@Bogdanp Bogdanp merged commit 0365a37 into Bogdanp:master Mar 30, 2025
10 of 11 checks passed
@Bogdanp
Copy link
Copy Markdown
Owner

Bogdanp commented Mar 30, 2025

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants