Example usage for com.rabbitmq.client Connection abort

List of usage examples for com.rabbitmq.client Connection abort

Introduction

In this page you can find the example usage for com.rabbitmq.client Connection abort.

Prototype

void abort(int timeout);

Source Link

Document

Abort this connection and all its channels with the com.rabbitmq.client.AMQP#REPLY_SUCCESS close code and message 'OK'.

Usage

From source file:mx.bigdata.utils.amqp.AMQPFinalizer.java

License:Apache License

public synchronized void closeConnections() {
    for (Connection conn : this.connections) {
        conn.abort(10000);
        logger.warn("Connection closed: " + conn);
    }//  w  w  w  .j  a v  a  2  s. co  m
    this.connections.clear();
}

From source file:org.ballerinalang.messaging.rabbitmq.util.ConnectionUtils.java

License:Open Source License

/**
 * Closes the connection./*from  w ww. j a  v a2  s.  co m*/
 *
 * @param connection RabbitMQ Connection object.
 * @param timeout    Timeout (in milliseconds) for completing all the close-related operations, use -1 for infinity.
 */
private static void abortConnection(Connection connection, int timeout) {
    connection.abort(timeout);
}