I've started working on a new project and we've been asked to build the system as a series of micro services, using RabbitMQ as a communication layer between them.
When developing REST APIs I tend to favour using the accepts HTTP header to control versioning and I see that you can use a header exchange in RabbitMQ to route messages in a similar way. However, as this is purely an internal messaging system, I'm not sure if the added complexity of a header exchange is really worth the while?
What is a typical setup for versioning RabbitMQ messages? It seems to me the options are:
Thanks for any input you may have.
I'd go with routing key version system for 2 main reasons:
Consumers will be able to bind (via queues of course) to their compatible versions via multiple bindings. Using semantic version (http://semver.org/) standard would be leveraged here via asterix and hash criteria.
You're not bound to using Rabbitmq as routing key is a standard function of AMQP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With