Example usage for com.rabbitmq.client Address parseAddresses

List of usage examples for com.rabbitmq.client Address parseAddresses

Introduction

In this page you can find the example usage for com.rabbitmq.client Address parseAddresses.

Prototype

public static Address[] parseAddresses(String addresses) 

Source Link

Document

Array-based factory method: takes an array of formatted address strings as construction parameter

Usage

From source file:com.kenshoo.flume.rabbitmq.SimpleRabbitMqProducer.java

License:Apache License

public void open() throws IOException {
    conn = factory.newConnection(Address.parseAddresses(hosts));
    channel = conn.createChannel();//from   w ww. j  av  a 2  s  . c  o  m
    logger.debug("channel created successfully");
}

From source file:com.nxttxn.vramel.components.rabbitMQ.RabbitMQEndpoint.java

License:Apache License

public void setAddresses(String addresses) {
    Address[] addressArray = Address.parseAddresses(addresses);
    if (addressArray.length > 0) {
        this.addresses = addressArray;
    }//from  w  w  w  .  j av a 2 s  .com
}

From source file:org.opentestsystem.delivery.logging.RabbitConfiguration.java

License:Open Source License

private String determineHost() {
    if (isBlank(addresses)) {
        return host;
    }/*  ww w .j a  v  a2 s. com*/
    final Address[] addressArray = Address.parseAddresses(addresses);
    return addressArray[0].getHost();
}

From source file:org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.java

License:Apache License

/**
 * Set addresses for clustering.//from   www.j  a  v  a  2s.c  om
 * @param addresses list of addresses with form "host[:port],..."
 */
public void setAddresses(String addresses) {
    Address[] addressArray = Address.parseAddresses(addresses);
    if (addressArray.length > 0) {
        this.addresses = addressArray;
    }
}