0

Is it possible to somehow be notified when exchanges are added and removed from RabbitMQ? I'd like to have a "client" on a remote machine that is interested in knowing this, preferably without using polling. The reason for this would be to subscribe to ALL messages in RabbitMQ (and thus let the client create a new queue for each new exchange) in order to persist the messages.

Johan
  • 37,479
  • 32
  • 149
  • 237

1 Answers1

2

There are RabbitMQ Event Exchange plugin which:

declares a topic exchange called 'amq.rabbitmq.event' in the default virtual host. All events are published to this exchange with routing keys like 'exchange.created', 'binding.deleted' etc, so you can subscribe to only the events you're interested in.

You are interested in exchange.created and exchange.deleted.

Then on a client you can just to call basic.consume and get what you are interested in.

pinepain
  • 12,453
  • 3
  • 60
  • 65