Example usage for com.rabbitmq.client.impl ClientVersion VERSION

List of usage examples for com.rabbitmq.client.impl ClientVersion VERSION

Introduction

In this page you can find the example usage for com.rabbitmq.client.impl ClientVersion VERSION.

Prototype

String VERSION

To view the source code for com.rabbitmq.client.impl ClientVersion VERSION.

Click Source Link

Usage

From source file:de.htwk_leipzig.bis.connection.handshake.clientRewrite.Copyright.java

License:Mozilla Public License

/**
 * Retrieve a copy of the default table of client properties that will be
 * sent to the server during connection startup. This method is called when
 * each new ConnectionFactory instance is constructed.
 * /*from  w w w .j a  va 2s.c om*/
 * @return a map of client properties
 * @see Connection#getClientProperties
 */
public static final Map<String, Object> defaultClientProperties() {
    Map<String, Object> props = new HashMap<String, Object>();
    props.put("product", LongStringHelper.asLongString("RabbitMQ"));
    props.put("version", LongStringHelper.asLongString(ClientVersion.VERSION));
    props.put("platform", LongStringHelper.asLongString("Java"));
    props.put("copyright", LongStringHelper.asLongString(Copyright.COPYRIGHT));
    props.put("information", LongStringHelper.asLongString(Copyright.LICENSE));

    Map<String, Object> capabilities = new HashMap<String, Object>();
    capabilities.put("publisher_confirms", true);
    capabilities.put("exchange_exchange_bindings", true);
    capabilities.put("basic.nack", true);
    capabilities.put("consumer_cancel_notify", true);
    capabilities.put("connection.blocked", true);
    capabilities.put("authentication_failure_close", true);

    props.put("capabilities", capabilities);

    return props;
}