List of usage examples for org.springframework.amqp.rabbit.core RabbitTemplate setExchange
public void setExchange(@Nullable String exchange)
From source file:lab.example.service.LotteryService.java
@Bean public RabbitTemplate rabbitTemplate() { RabbitTemplate template = new RabbitTemplate(connectionFactory); template.setExchange(this.exchangeName); return template; }
From source file:net.wessendorf.amqp.RabbitConfiguration.java
@Bean public RabbitTemplate rabbitTemplate() { RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory()); rabbitTemplate.setExchange("demo_exchange"); //rabbitTemplate.setQueue("myqueue"); return rabbitTemplate; }
From source file:lab.example.service.MessageListener.java
@Bean public RabbitTemplate rabbitTemplate() { RabbitTemplate template = new RabbitTemplate(connectionFactory); template.setExchange(exchangeName); return template; }
From source file:vn.topmedia.monitor.rabbit.server.RabbitServerConfiguration.java
@Bean public RabbitTemplate rabbitTemplate() { RabbitTemplate template = new RabbitTemplate(connectionFactory()); //Chuyen noi dung sang dang JSON template.setMessageConverter(jsonMessageConverter()); template.setExchange(this.monitorExchangeName); return template; }
From source file:com.nkapps.billing.configs.RabbitMQConfig.java
@Bean public RabbitTemplate rabbitTemplate() { RabbitTemplate template = new RabbitTemplate(connectionFactory()); template.setExchange(BILLING_EXCHANGE); template.setMessageConverter(rabbitMessageConverter()); return template; }
From source file:io.manasobi.commons.config.AmqpConfig.java
@Bean public RabbitTemplate rabbitTemplate() { RabbitTemplate rabbitTemplate = new RabbitTemplate(); rabbitTemplate.setQueue("manasobi"); //rabbitTemplate.setRoutingKey("manasobi.key"); //rabbitTemplate.setExchange("manasobi.key"); rabbitTemplate.setRoutingKey("key.manasobi"); rabbitTemplate.setExchange("manasobi"); rabbitTemplate.setConnectionFactory(rabbitConnectionFactory()); return rabbitTemplate; }
From source file:acromusashi.stream.component.rabbitmq.AmqpTemplateFactory.java
/** * RabbitTemplate??/*from w w w .j a v a 2 s . co m*/ * * @param queueName ?? * @param connectionFactory ConnectionFactory * @return RabbitTemplate * @throws RabbitmqCommunicateException amqpTemplate????????? */ private RabbitTemplate getRabbitTemplate(String queueName, ConnectionFactory connectionFactory) throws RabbitmqCommunicateException { // AmqpTemplate????????? RabbitTemplate template = null; try { template = (RabbitTemplate) BeanUtils.cloneBean(getContextBuilder().getAmqpTemplate(queueName)); } catch (Exception ex) { throw new RabbitmqCommunicateException(ex); } template.setConnectionFactory(connectionFactory); template.setExchange(queueName); template.setQueue(queueName); return template; }