Example usage for org.springframework.amqp.core FanoutExchange FanoutExchange

List of usage examples for org.springframework.amqp.core FanoutExchange FanoutExchange

Introduction

In this page you can find the example usage for org.springframework.amqp.core FanoutExchange FanoutExchange.

Prototype

public FanoutExchange(String name) 

Source Link

Usage

From source file:org.springframework.xd.dirt.integration.rabbit.RabbitMessageBus.java

@Override
public void bindPubSubProducer(String name, MessageChannel moduleOutputChannel, Properties properties) {
    validateProducerProperties(name, properties, SUPPORTED_PUBSUB_PRODUCER_PROPERTIES);
    RabbitPropertiesAccessor accessor = new RabbitPropertiesAccessor(properties);
    String exchangeName = accessor.getPrefix(this.defaultPrefix) + "topic." + name;
    declareExchangeIfNotPresent(new FanoutExchange(exchangeName));
    AmqpOutboundEndpoint fanout = new AmqpOutboundEndpoint(determineRabbitTemplate(accessor));
    fanout.setExchangeName(exchangeName);
    configureOutboundHandler(fanout, accessor);
    doRegisterProducer(name, moduleOutputChannel, fanout, accessor);
}