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

III-4841 Fix queue routing keys #214

Merged
merged 44 commits into from
Jul 15, 2022
Merged

Conversation

bertramakers
Copy link
Contributor

Fixed

  • Fixed queues being (re)declared by the consumers using the default # routing key, which resulted in all messages being sent to both the API and CLI queues.

Changed

  • Refactored and simplified the setup of the AMQP consumers so it is more readable (hopefully) and it was easier to inject the routing key config. Before it would have to go through multiple classes / methods, while now we can easily inject it directly.

Ticket: https://jira.uitdatabank.be/browse/III-4841

There has only been one implementation for years anyway
It was only protected because it was abstract before
This reduces the number of properties and makes it easier to see at a glance what is happening in the constructor
And use the same order of methods in both the interface and the implementation
The extra check it did on the return type is no longer necessary since we got return types in PHP
The $callbacks property is technically public, but marked as internal and the phpdoc mentions to use is_consuming() instead
Don't talk to your friends' friends, and more loose coupling
It should not be used directly, only as a callback on the AMQPChannel class
We can still test it by storing the callback that is sent to AMQPChannel::basic_consume() in a property in the unit tests, and then call the callback ourselves
@bertramakers bertramakers marked this pull request as ready for review July 15, 2022 14:19
@bertramakers
Copy link
Contributor Author

Since there is no one available for code review and this is a relatively urgent bugfix, I'm going to merge this without code review for now. Feel free to double-check everything when you are back @JonasVHG and/or @LucWollants , we can always make another PR for any comments.

@bertramakers bertramakers merged commit a8eb989 into main Jul 15, 2022
@bertramakers bertramakers deleted the III-4841-fix-queue-routing-keys branch July 15, 2022 14:22
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.

None yet

1 participant