Major refactor of ConnectionFactory and RabbitmqServiceProvider

Created on 4 February 2024, 8 months ago

Problem/Motivation

As of `3.x` the `ConnectionFactory` service is dynamically registered via `RabbitmqServiceProvider` per set of credentials set under `rabbitmq_credentials` in the settings file. (e.g rabbitmq.connection.factory.default)

This is unnecessary and almost defeats the point of having this be a factory class.

Steps to reproduce

N/A

Proposed resolution

For `5.x` implement a generic statically defined `rabbitmq.connection.factory` that can be used by all `QueueFactory` instantiations.
To achieve this we need to do a couple of things.
- Deprecate `ConnectionFactory::getConnection` which will be done as part of a minor release to `3.x` https://git.drupalcode.org/project/rabbitmq/-/merge_requests/44
- Create a `QueueFactoryFactory` to produce each dynamically registered `QueueFactory`. This allows us to stay inline with the core queue API expectations and means we can pass our connection object directly into each instantiation.

Remaining tasks

Work being undertaken here: https://git.drupalcode.org/project/rabbitmq/-/merge_requests/43

User interface changes

None

API changes

CR here: https://www.drupal.org/node/3419104

Data model changes

📌 Task
Status

Active

Version

5.0

Component

Code

Created by

🇬🇧United Kingdom zach.bimson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024