client/src/main/java/io/hoplin/Publisher.java
/**
   * Publish message on specific channel. This method blocks
   *
   * @param channel
   * @param exchange
   * @param routingKey
   * @param message
   * @param headers
   * @param <T>
   */
Publish message on specific channel.
Publish message on specific channel .
public <T> void basicPublish(final Channel channel, final String exchange,
      final String routingKey, final T message,
      final Map<String, Object> headers) {
    final CompletableFuture<Void> completable = basicPublishAsync(channel, exchange,
        routingKey, message, headers);
    try {
      completable.get();
    } catch (final InterruptedException e) {
      Thread.currentThread().interrupt();
    } catch (final ExecutionException e) {
      throw new HoplinRuntimeException("Publishing exception ", e);
    }
  }
public < T > void basicPublish ( final Channel channel , final String exchange , final String routingKey , final T message , final Map < String , Object > headers ) { final CompletableFuture < Void > completable = basicPublishAsync ( channel , exchange , routingKey , message , headers ) ; try { completable . get ( ) ; } catch ( final InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } catch ( final ExecutionException e ) { throw new HoplinRuntimeException ( "Publishing exception " , e ) ; } }
Publish message on specific channel.
Publish message on specific channel .