Example usage for org.springframework.amqp.rabbit.connection AbstractConnectionFactory setAddresses

List of usage examples for org.springframework.amqp.rabbit.connection AbstractConnectionFactory setAddresses

Introduction

In this page you can find the example usage for org.springframework.amqp.rabbit.connection AbstractConnectionFactory setAddresses.

Prototype

public void setAddresses(String addresses) 

Source Link

Document

Set addresses for clustering.

Usage

From source file:acromusashi.stream.component.rabbitmq.AmqpTemplateFactory.java

/**
 * ConnectionFactory??/*from   w  ww .  j  a v  a 2 s  .c o  m*/
 * 
 * @param queueName ??
 * @param processList RabbitMQ
 * @return ConnectionFactory
 * @throws RabbitmqCommunicateException connectionFactory?????????
 */
private AbstractConnectionFactory getCachingConnectionFactory(String queueName, List<String> processList)
        throws RabbitmqCommunicateException {
    AbstractConnectionFactory connectionFactory = null;
    try {
        connectionFactory = (AbstractConnectionFactory) getContextBuilder().getConnectionFactory(queueName);
    } catch (Exception ex) {
        throw new RabbitmqCommunicateException(ex);
    }

    String adresses = StringUtils.join(processList, ',');
    connectionFactory.setAddresses(adresses);
    return connectionFactory;
}