Class RabbitMQConsumer

java.lang.Object
io.vertx.mutiny.rabbitmq.RabbitMQConsumer
All Implemented Interfaces:
io.smallrye.mutiny.vertx.MutinyDelegate, io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>, io.vertx.mutiny.core.streams.StreamBase

public class RabbitMQConsumer extends Object implements io.smallrye.mutiny.vertx.MutinyDelegate, io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
A stream of messages from a rabbitmq queue.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

  • Field Details

    • __TYPE_ARG

      public static final io.smallrye.mutiny.vertx.TypeArg<RabbitMQConsumer> __TYPE_ARG
  • Constructor Details

    • RabbitMQConsumer

      public RabbitMQConsumer(io.vertx.rabbitmq.RabbitMQConsumer delegate)
    • RabbitMQConsumer

      public RabbitMQConsumer(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.rabbitmq.RabbitMQConsumer getDelegate()
      Specified by:
      getDelegate in interface io.smallrye.mutiny.vertx.MutinyDelegate
      Specified by:
      getDelegate in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Specified by:
      getDelegate in interface io.vertx.mutiny.core.streams.StreamBase
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • pipe

      public io.vertx.mutiny.core.streams.Pipe<RabbitMQMessage> pipe()
      Specified by:
      pipe in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
    • pipeTo

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)
      Specified by:
      pipeTo in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
    • pipeToAndAwait

      public Void pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)
      Specified by:
      pipeToAndAwait in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
    • pipeToAndForget

      public void pipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<RabbitMQMessage> dst)
      Specified by:
      pipeToAndForget in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
    • exceptionHandler

      public RabbitMQConsumer exceptionHandler(Consumer<Throwable> exceptionHandler)
      Specified by:
      exceptionHandler in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Specified by:
      exceptionHandler in interface io.vertx.mutiny.core.streams.StreamBase
      Parameters:
      exceptionHandler - the exception handler
      Returns:
    • handler

      public RabbitMQConsumer handler(Consumer<RabbitMQMessage> messageArrived)
      Specified by:
      handler in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Parameters:
      messageArrived -
      Returns:
    • pause

      public RabbitMQConsumer pause()
      Specified by:
      pause in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Returns:
      a reference to this, so the API can be used fluently
    • resume

      public RabbitMQConsumer resume()
      Specified by:
      resume in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Returns:
      a reference to this, so the API can be used fluently
    • endHandler

      public RabbitMQConsumer endHandler(Runnable endHandler)
      Specified by:
      endHandler in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Parameters:
      endHandler -
      Returns:
    • queueName

      public String queueName()
      Returns:
      the name of the queue
    • setQueueName

      public RabbitMQConsumer setQueueName(String name)
      Parameters:
      name - the name of the queue
      Returns:
      a reference to this, so the API can be used fluently
    • consumerTag

      public String consumerTag()
      Returns:
      a consumer tag
    • cancel

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> cancel()
      Stop message consumption from a queue.

      The operation is asynchronous. When consumption is stopped, you can also be notified via endHandler(java.lang.Runnable)

      Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

      Returns:
      the uni firing the result of the operation when completed, or a failure if the operation failed.
    • cancelAndAwait

      public Void cancelAndAwait()
      Blocking variant of cancel().

      This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      Returns:
      the Void instance produced by the operation.
    • cancelAndForget

      public void cancelAndForget()
      Variant of cancel() that ignores the result of the operation.

      This method subscribes on the result of cancel(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from cancel() but you don't need to compose it with other operations.

    • isCancelled

      public boolean isCancelled()
      Returns:
      true if cancel() has been called.
    • isPaused

      public boolean isPaused()
      Returns:
      is the stream paused?
    • fetch

      public RabbitMQConsumer fetch(long amount)
      Specified by:
      fetch in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
      Parameters:
      amount -
      Returns:
      a reference to this, so the API can be used fluently
    • toMulti

      @CheckReturnValue public io.smallrye.mutiny.Multi<RabbitMQMessage> toMulti()
      Specified by:
      toMulti in interface io.vertx.mutiny.core.streams.ReadStream<RabbitMQMessage>
    • toBlockingIterable

      public Iterable<RabbitMQMessage> toBlockingIterable()
    • toBlockingStream

      public Stream<RabbitMQMessage> toBlockingStream()
    • newInstance

      public static RabbitMQConsumer newInstance(io.vertx.rabbitmq.RabbitMQConsumer arg)