Is it possible to configure a RabbitMQ connection programatically?

Created on 4 May 2023, about 1 year ago
Updated 24 October 2023, 8 months ago

Problem/Motivation

I need to configure multiple RabbitMQ connections via a custom module's UI.

The idea being that I'd read the connection information from a config entity, then initialize a new RabbitMQ connection, and queue, based on that data.

Is there a way to do that with this module? So far all I see is using settings.php directly.

Thanks!

πŸ’¬ Support request
Status

Fixed

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jerrac

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

Comments & Activities

  • Issue created by @jerrac
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Queues/Exchanges can be configured through the normal config entry in the rabbitmq.config namespace.

    Connections however currently require them to be present as as part of a Settings::class that is injected into the rabbitmq.connection.factory service and used as part of the RabbitmqServiceProvider. The Settings::class normally populates from settings.php however it may be possible to modify it similar to how we do so as part of the module KernelTests though no such attempts have been documented for production with regards to the RabbitMq service.

  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    Marking as fixed as it has been several months without additional comment. I am assuming the response in #2 answered the questions.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024