client/src/main/java/io/hoplin/AbstractExchangeClient.java
/**
   * This will actively declare:
   * <p>
   * a durable, non-autodelete exchange of "direct" type a durable, non-exclusive, non-autodelete
   * queue with a well-known name
   */
This will actively declare:

a durable, non-autodelete exchange of "direct" type a durable, non-exclusive, non-autodelete
queue with a well-known name
This will actively declare : a durable non - autodelete exchange of " direct " type a durable non - exclusive non - autodelete queue with a well - known name
void bind(final String type) {
    Objects.requireNonNull(type);
    final String exchangeName = binding.getExchange();
    if (Strings.isNullOrEmpty(exchangeName)) {
      throw new IllegalArgumentException("Exchange name can't be empty");
    }
    try {
      final boolean durable = true;
      final boolean autoDelete = false;
      final Map<String, Object> arguments = new HashMap<>();
      client.exchangeDeclare(exchangeName, type, durable, autoDelete, arguments);
    } catch (final Exception e) {
      throw new HoplinRuntimeException("Unable to bind to queue", e);
    }
  }
void bind ( final String type ) { Objects . requireNonNull ( type ) ; final String exchangeName = binding . getExchange ( ) ; if ( Strings . isNullOrEmpty ( exchangeName ) ) { throw new IllegalArgumentException ( "Exchange name can't be empty" ) ; } try { final boolean durable = true ; final boolean autoDelete = false ; final Map < String , Object > arguments = new HashMap < > ( ) ; client . exchangeDeclare ( exchangeName , type , durable , autoDelete , arguments ) ; } catch ( final Exception e ) { throw new HoplinRuntimeException ( "Unable to bind to queue" , e ) ; } }
This will actively declare:
 <p>
 a durable, non-autodelete exchange of "direct" type a durable, non-exclusive, non-autodelete
 queue with a well-known name
This will actively declare : <p > a durable non - autodelete exchange of " direct " type a durable non - exclusive non - autodelete queue with a well - known name
// prevent changing default queues // survive a server restart // keep it even if not in use // Make sure that the Exchange is declared