Is there a way to do "Migration" in Rabbitmq?

Asked

Viewed 115 times

2

Hello!

I wonder if there is any alternative to create/change/remove Exchanges, queues and bindings without relying on the framework (in my case, Spring) for this.

Often we need to change the name of a Routing Key, Queue or Exchange, and these frameworks do not allow this type of more refined change. As a consequence, the tendency is for the original names to remain. In the future, this confuses the organization of the queues, as you cannot easily give a proper maintenance in their name and eventually reorganize them.

The ideal for me would be a tool that controls this, as with the migration tools (Migration), like Liquibase, Flyway, etc.

Making a parallel with the database, currently let Spring create everything in Rabbitmq seems analogous to leave on the hbm2ddl option "update" in Hibernate.

I know questions about tools are not suitable in the OS, but since I did not find any alternative to this problem so I thought the question was valid.

  • 1

    I received a negative vote. It would be possible to share the reason?

1 answer

1


After research on the subject, I do not believe that I can implement a strategy of Migration for Rabbitmq queues as I do for a database.

The possibility to change them exists, but not in a declarative form. It needs to be done by programming the change.

With Spring, I can use the RabbitAdmin.declareBinding() to do the bind with a route key (and/or exchange) different. I can use the RabbitAdmin.removeBinding() to remove the old.

Cannot change the arguments of a created queue, such as its variables related to DLQ (Dead Letter Queue) or durability.

To move messages from an old queue to a new queue, I can program to do this or use the plugin Shovel, installed in Rabbitmq itself.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.