Skip to content

Add support for arbitrary rabbitmq arguments #430

@elijah-roberts

Description

@elijah-roberts

Currently beaver will either pass an empty dictionary to rabbit, or if 'ha_queue' is true, it will pass a hardcoded value

https://github.com/python-beaver/python-beaver/blob/master/beaver/transports/rabbitmq_transport.py#L47-L52

def _on_exchange_declareok(self,unused):
        self._logger.debug("RabbitMQ: Exchange Declared")
        self._channel.queue_declare(self._on_queue_declareok,
                                    queue=self._rabbitmq_config['queue'],
                                    durable=self._rabbitmq_config['queue_durable'],
                                    arguments={'x-ha-policy': 'all'} if self._rabbitmq_config['ha_queue'] else {}) 

There are use cases where queues/exchanges are pre-setup with arguments and cause an in-equivalent argument error. To solve this beaver would need to be able to accept and parse additional arguments from the config file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions