当前位置: 首页>>代码示例>>Java>>正文


Java AmqpAdmin类代码示例

本文整理汇总了Java中org.springframework.amqp.core.AmqpAdmin的典型用法代码示例。如果您正苦于以下问题:Java AmqpAdmin类的具体用法?Java AmqpAdmin怎么用?Java AmqpAdmin使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AmqpAdmin类属于org.springframework.amqp.core包,在下文中一共展示了AmqpAdmin类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: schedulingRunner

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
public CommandLineRunner schedulingRunner(final TaskExecutor executor, final AmqpAdmin amqpAdmin, final ProcessService processStarter) {
    return args -> executor.execute(() -> {
        
        // Init Rabbit exchange and queue
        amqpAdmin.deleteExchange(EXCHANGE);
        TopicExchange exchange = new TopicExchange(EXCHANGE);
        amqpAdmin.declareExchange(exchange);
        Queue queue = new Queue("flowable-history-jobs", true);
        amqpAdmin.declareQueue(queue);
        amqpAdmin.declareBinding(BindingBuilder.bind(queue).to(exchange).with("flowable-history-jobs"));
      
    });
}
 
开发者ID:flowable,项目名称:flowable-examples,代码行数:15,代码来源:ProcessApplication.java

示例2: amqpAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
@ConditionalOnSingleCandidate(ConnectionFactory.class)
@ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic", matchIfMissing = true)
@ConditionalOnMissingBean(AmqpAdmin.class)
public AmqpAdmin amqpAdmin(ConnectionFactory connectionFactory) {
	return new RabbitAdmin(connectionFactory);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:8,代码来源:RabbitAutoConfiguration.java

示例3: testStaticQueues

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Test
public void testStaticQueues() {
	load(TestConfiguration.class, "spring.rabbitmq.dynamic:false");
	// There should NOT be an AmqpAdmin bean when dynamic is switch to false
	this.thrown.expect(NoSuchBeanDefinitionException.class);
	this.thrown.expectMessage("No qualifying bean of type "
			+ "[org.springframework.amqp.core.AmqpAdmin] is defined");
	this.context.getBean(AmqpAdmin.class);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:10,代码来源:RabbitAutoConfigurationTests.java

示例4: prepareQueues

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
public InitializingBean prepareQueues(AmqpAdmin amqpAdmin) {
	return () -> {
		Queue queue = new Queue(NOTIFICATIONS, true);
		DirectExchange exchange = new DirectExchange(NOTIFICATIONS);
		Binding binding = BindingBuilder.bind(queue).to(exchange).with(NOTIFICATIONS);
		amqpAdmin.declareQueue(queue);
		amqpAdmin.declareExchange(exchange);
		amqpAdmin.declareBinding(binding);

	};
}
 
开发者ID:livelessons-spring,项目名称:building-microservices,代码行数:13,代码来源:MessagingApplication.java

示例5: prepareQueues

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
public InitializingBean prepareQueues(AmqpAdmin amqpAdmin) {
	return () -> {
		Queue queue = new Queue(this.echoQueueAndExchangeName, true);
		DirectExchange exchange = new DirectExchange(this.echoQueueAndExchangeName);
		Binding binding = BindingBuilder.bind(queue).to(exchange)
				.with(this.echoQueueAndExchangeName);
		amqpAdmin.declareQueue(queue);
		amqpAdmin.declareExchange(exchange);
		amqpAdmin.declareBinding(binding);
	};
}
 
开发者ID:livelessons-spring,项目名称:building-microservices,代码行数:13,代码来源:AmqpIntegration.java

示例6: amqpAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:ctc-g,项目名称:sinavi-jfw,代码行数:14,代码来源:ExceptionQueueContextConfig.java

示例7: setup

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Before
public void setup() {
    context = new AnnotationConfigApplicationContext(RabbitMQInitializerTestContext.class);
    admin = context.getBean(AmqpAdmin.class);
    initializer = new RabbitMQInitializer();
    initializer.setAdmin(admin);
    initializer.setContext(context);
    initializer.setDeleted(true);
}
 
开发者ID:ctc-g,项目名称:sinavi-jfw,代码行数:10,代码来源:RabbitMQInitializerTest.java

示例8: rabbitAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
AmqpAdmin rabbitAdmin(ConnectionFactory connectionFactory) {
    return new RabbitAdmin(connectionFactory);
}
 
开发者ID:capesonlee,项目名称:tangtang-spring-cloud,代码行数:5,代码来源:AmqpConfig.java

示例9: rabbitAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Autowired
void rabbitAdmin(AmqpAdmin admin, FanoutExchange eventBusExchange) {
    admin.declareExchange(eventBusExchange);
}
 
开发者ID:weechang,项目名称:Taroco,代码行数:5,代码来源:RabbitConfiguration.java

示例10: MqProducer

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Autowired
public MqProducer(AmqpAdmin amqpAdmin, AmqpTemplate amqpTemplate) {
    this.amqpAdmin = amqpAdmin;
    this.amqpTemplate = amqpTemplate;
}
 
开发者ID:lupindong,项目名称:xq_seckill_microservice,代码行数:6,代码来源:MqProducer.java

示例11: rabbitAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
@ConditionalOnSingleCandidate(ConnectionFactory.class)
@ConditionalOnMissingBean(AmqpAdmin.class)
public RabbitAdmin rabbitAdmin() {
    return new RabbitAdmin(connectionFactory);
}
 
开发者ID:lodsve,项目名称:lodsve-framework,代码行数:7,代码来源:RabbitConfiguration.java

示例12: amqpAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
public AmqpAdmin amqpAdmin() {
    RabbitAdmin rabbitAdmin = new RabbitAdmin(connectionFactory());
    return rabbitAdmin;
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:6,代码来源:RabbitMQConfig.java

示例13: amqpAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
public AmqpAdmin amqpAdmin() {
    return new RabbitAdmin(connectionFactory());
}
 
开发者ID:flowable,项目名称:flowable-examples,代码行数:5,代码来源:ProcessApplication.java

示例14: getRabbitAdmin

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
public AmqpAdmin getRabbitAdmin(final ConnectionFactory connectionFactory) {
    return new RabbitAdmin(connectionFactory);
}
 
开发者ID:sem2nawara,项目名称:acme-solution,代码行数:5,代码来源:RabbitConfigurer.java

示例15: amqpService

import org.springframework.amqp.core.AmqpAdmin; //导入依赖的package包/类
@Bean
@Autowired
AmqpService amqpService(AmqpAdmin amqpAdmin, ConnectionFactory connectionFactory, AmqpTemplate amqpTemplate) {
    return new AmqpService(amqpAdmin, connectionFactory, amqpTemplate);
}
 
开发者ID:Byteflair,项目名称:resthooks,代码行数:6,代码来源:AmqpConfig.java


注:本文中的org.springframework.amqp.core.AmqpAdmin类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。