use of org.springframework.amqp.core.FanoutExchange in project spring-integration by spring-projects.
the class PublishSubscribeAmqpChannel method obtainQueueName.
@Override
protected String obtainQueueName(String channelName) {
if (this.exchange == null) {
String exchangeName = "si.fanout." + channelName;
this.exchange = new FanoutExchange(exchangeName);
}
this.binding = BindingBuilder.bind(this.queue).to(this.exchange);
return this.queue.getName();
}
use of org.springframework.amqp.core.FanoutExchange in project tutorials by eugenp.
the class BroadcastConfig method fanoutBindings.
@Bean
public List<Declarable> fanoutBindings() {
Queue fanoutQueue1 = new Queue(fanoutQueue1Name, false);
Queue fanoutQueue2 = new Queue(fanoutQueue2Name, false);
FanoutExchange fanoutExchange = new FanoutExchange(fanoutExchangeName);
return Arrays.asList(fanoutQueue1, fanoutQueue2, fanoutExchange, BindingBuilder.bind(fanoutQueue1).to(fanoutExchange), BindingBuilder.bind(fanoutQueue2).to(fanoutExchange));
}
Aggregations