Example usage for com.rabbitmq.client.impl DefaultExceptionHandler DefaultExceptionHandler

List of usage examples for com.rabbitmq.client.impl DefaultExceptionHandler DefaultExceptionHandler

Introduction

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

Prototype

DefaultExceptionHandler

Source Link

Usage

From source file:org.eclipse.hono.client.AmqpConnectionManagerImpl.java

License:Open Source License

private Connection createConnection(final ConnectionConfig connectionConfig) throws NoSuchAlgorithmException,
        KeyManagementException, URISyntaxException, IOException, TimeoutException {
    final ConnectionFactory factory = new ConnectionFactory();
    final String amqpUri = connectionConfig.getConnectionUri();
    AmqpConnectionManagerImpl.LOGGER.info("Connecting to " + amqpUri);
    factory.setUri(amqpUri);/*from   w  w  w.j ava2  s.  co m*/
    factory.setAutomaticRecoveryEnabled(true);
    factory.setExceptionHandler(new DefaultExceptionHandler());
    return factory.newConnection();
}