ansible-collections / community.rabbitmq

Manage RabbitMQ with Ansible
http://galaxy.ansible.com/community/rabbitmq
Other
30 stars 46 forks source link

Enabling rabbitmq_exchange to create 3 new exchange types. #142

Closed Im0 closed 1 year ago

Im0 commented 1 year ago
SUMMARY

Fixes #123 - This PR allows rabbitmq_exchange to create exchanges with the following 3 exchange types: x-random, x-consistent-hash and x-recent-history. These exchange types are not default and are enabled on the rabbitmq server via plugins.

ISSUE TYPE
COMPONENT NAME

rabbitmq_exchange

ADDITIONAL INFORMATION
- name: Testing creating a x-random exchange type
  hosts: localhost
  gather_facts: no
  tasks:
    - name: Enable x-random exchange plugin
      community.rabbitmq.rabbitmq_plugin:
        names: rabbitmq_random_exchange
        new_only: yes
        state: enabled

    - name: Try creating an x-random exchange type
      community.rabbitmq.rabbitmq_exchange:
        name: test_exchange
        exchange_type: "x-random"
        login_host: 172.16.0.2
        login_user: guest
        login_password: guest

    - name: Try creating an x-consistent-hash exchange type
      community.rabbitmq.rabbitmq_exchange:
        name: test_exchange-hash
        exchange_type: "x-consistent-hash"
        login_host: 172.16.0.2
        login_user: guest
        login_password: guest
Im0 commented 1 year ago

@cognifloyd thanks for your review. When you have a moment please take another look. TIA.