Java Code Examples for org.springframework.amqp.rabbit.core.RabbitAdmin#setAutoStartup()
The following examples show how to use
org.springframework.amqp.rabbit.core.RabbitAdmin#setAutoStartup() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExceptionQueueContextConfig.java From sinavi-jfw with Apache License 2.0 | 5 votes |
/** * RabbitMQの管理操作を実行する{@link AmqpAdmin}のインスタンスを生成し、DIコンテナに登録します。 * この{@link AmqpAdmin}を利用することにより、Exchange/Queueの自動生成を行うことが可能となります。 * 自動生成する場合はSpring のBeanProfileのスコープ指定を<strong>development</strong>に指定してください。 * @return {@link RabbitAdmin}のインスタンス */ @Bean @Profile("development") public AmqpAdmin amqpAdmin() { RabbitAdmin rabbitAdmin = new RabbitAdmin(factory()); rabbitAdmin.setAutoStartup(true); return rabbitAdmin; }
Example 2
Source File: TestQueueCleaner.java From sinavi-jfw with Apache License 2.0 | 5 votes |
public static void cleaner() { RabbitAdmin admin = new RabbitAdmin(factory()); admin.setAutoStartup(true); admin.deleteExchange("error.exchange"); admin.deleteExchange("exception.exchange"); admin.deleteQueue("recoverable.exception.messages.queue"); admin.deleteQueue("unrecoverable.exception.messages.queue"); }
Example 3
Source File: TestQueueCleaner.java From sinavi-jfw with Apache License 2.0 | 4 votes |
public static void retryCleaner() { RabbitAdmin admin = new RabbitAdmin(factory()); admin.setAutoStartup(true); admin.deleteExchange("retry.test.exchange"); admin.deleteQueue("retry.test.queue"); }
Example 4
Source File: RabbitMQInitializerTest.java From sinavi-jfw with Apache License 2.0 | 4 votes |
@Bean public AmqpAdmin amqpAdmin() { RabbitAdmin rabbitAdmin = new RabbitAdmin(factory()); rabbitAdmin.setAutoStartup(true); return rabbitAdmin; }
Example 5
Source File: RabbitMQConfig.java From micro-service with MIT License | 3 votes |
public AmqpAdmin amqpAdmin() { RabbitAdmin admin = new RabbitAdmin(connectionFactory()); admin.setAutoStartup(false); return admin; }