June 2018
Intermediate to advanced
408 pages
11h 23m
English
RabbitAdmin is used to declare the exchanges, queues, and binding that needs to be ready on startup. RabbitAdmin does the automatic declaration of the queues, exchanges, and binding. The main benefit of this auto-declaration is that if the connection is disconnected for some reason, they will be applied automatically when the connection is re-established. The following code configures RabbitAdmin:
@Beanpublic RabbitAdmin rabbitAdmin() { RabbitAdmin admin = new RabbitAdmin(connectionFactory()); admin.declareQueue(queue()); admin.declareExchange(exchange()); admin.declareBinding(exchangeBinding(exchange(), queue())); return admin;}
rabbitAdmin() will declare the Queue, Exchange, and Binding. The RabbitAdmin constructor ...
Read now
Unlock full access