client/src/main/java/io/hoplin/ConnectionProvider.java
/**
   * Create default connection provider and try to establish connection
   *
   * @param options
   * @return
   */
Create default connection provider and try to establish connection
@param options
@return
Create default connection provider and try to establish connection @param options @return
static ConnectionProvider createAndConnect(final RabbitMQOptions options) {
    Objects.requireNonNull(options);
    try {
      final ConnectionProvider provider = create(options);
      if (!provider.connect()) {
        throw new IllegalStateException("Unable to connect to broker : " + options);
      }
      return provider;
    } catch (final IOException | TimeoutException e) {
      throw new HoplinRuntimeException("Unable to connect to broker", e);
    }
  }
static ConnectionProvider createAndConnect ( final RabbitMQOptions options ) { Objects . requireNonNull ( options ) ; try { final ConnectionProvider provider = create ( options ) ; if ( ! provider . connect ( ) ) { throw new IllegalStateException ( "Unable to connect to broker : " + options ) ; } return provider ; } catch ( final IOException | TimeoutException e ) { throw new HoplinRuntimeException ( "Unable to connect to broker" , e ) ; } }
Create default connection provider and try to establish connection
 @param options
 @return
Create default connection provider and try to establish connection @param options @return