io.vertx.reactivex.rabbitmq

## Class RabbitMQConsumer

- java.lang.Object
- - io.vertx.reactivex.rabbitmq.RabbitMQConsumer

- All Implemented Interfaces:
    ReadStream<RabbitMQMessage>, StreamBase

      public class RabbitMQConsumer
      extends Object
      implements ReadStream<RabbitMQMessage>

  A stream of messages from a rabbitmq queue.

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<RabbitMQConsumer>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RabbitMQConsumer(RabbitMQConsumer delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancel()` Stop message consumption from a queue.
    `void` | `cancel(Handler<AsyncResult<Void>> cancelResult)` Stop message consumption from a queue.
    `String` | `consumerTag()`
    `RabbitMQConsumer` | `endHandler(Handler<Void> endHandler)` Set an end handler.
    `boolean` | `equals(Object o)`
    `RabbitMQConsumer` | `exceptionHandler(Handler<Throwable> exceptionHandler)` Set an exception handler on the read stream.
    `ReadStream<RabbitMQMessage>` | `fetch(long amount)` Fetch the specified `amount` of elements.
    `RabbitMQConsumer` | `getDelegate()`
    `RabbitMQConsumer` | `handler(Handler<RabbitMQMessage> messageArrived)` Set a message handler.
    `int` | `hashCode()`
    `boolean` | `isPaused()`
    `static RabbitMQConsumer` | `newInstance(RabbitMQConsumer arg)`
    `RabbitMQConsumer` | `pause()` Pause the stream of incoming messages from queue.
    `RabbitMQConsumer` | `resume()` Resume reading from a queue.
    `Completable` | `rxCancel()` Stop message consumption from a queue.
    `Flowable<RabbitMQMessage>` | `toFlowable()`
    `Observable<RabbitMQMessage>` | `toObservable()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface io.vertx.reactivex.core.streams.ReadStream

      `newInstance, newInstance`

    - ### Methods inherited from interface io.vertx.reactivex.core.streams.StreamBase

      `newInstance`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<RabbitMQConsumer> __TYPE_ARG

  - ### Constructor Detail

    - #### RabbitMQConsumer

          public RabbitMQConsumer(RabbitMQConsumer delegate)

  - ### Method Detail

    - #### 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`

    - #### getDelegate

          public RabbitMQConsumer getDelegate()

      Specified by:
        `getDelegate` in interface `ReadStream<RabbitMQMessage>`
      Specified by:
        `getDelegate` in interface `StreamBase`

    - #### toObservable

          public Observable<RabbitMQMessage> toObservable()

      Specified by:
        `toObservable` in interface `ReadStream<RabbitMQMessage>`

    - #### toFlowable

          public Flowable<RabbitMQMessage> toFlowable()

      Specified by:
        `toFlowable` in interface `ReadStream<RabbitMQMessage>`

    - #### fetch

          public ReadStream<RabbitMQMessage> fetch(long amount)

      Fetch the specified `amount` of elements. If the `ReadStream` has been paused, reading will recommence with the specified `amount` of items, otherwise the specified `amount` will be added to the current stream demand.
      Specified by:
        `fetch` in interface `ReadStream<RabbitMQMessage>`
      Parameters:
        `amount` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### exceptionHandler

          public RabbitMQConsumer exceptionHandler(Handler<Throwable> exceptionHandler)

      Set an exception handler on the read stream.
      Specified by:
        `exceptionHandler` in interface `ReadStream<RabbitMQMessage>`
      Specified by:
        `exceptionHandler` in interface `StreamBase`
      Parameters:
        `exceptionHandler` - the exception handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### handler

          public RabbitMQConsumer handler(Handler<RabbitMQMessage> messageArrived)

      Set a message handler. As message appear in a queue, the handler will be called with the message.
      Specified by:
        `handler` in interface `ReadStream<RabbitMQMessage>`
      Parameters:
        `messageArrived` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### pause

          public RabbitMQConsumer pause()

      Pause the stream of incoming messages from queue.

      The messages will continue to arrive, but they will be stored in a internal queue. If the queue size would exceed the limit provided by , then incoming messages will be discarded.

      Specified by:
        `pause` in interface `ReadStream<RabbitMQMessage>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### resume

          public RabbitMQConsumer resume()

      Resume reading from a queue. Flushes internal queue.
      Specified by:
        `resume` in interface `ReadStream<RabbitMQMessage>`
      Returns:
        a reference to this, so the API can be used fluently

    - #### endHandler

          public RabbitMQConsumer endHandler(Handler<Void> endHandler)

      Set an end handler. Once the stream has canceled successfully, the handler will be called.
      Specified by:
        `endHandler` in interface `ReadStream<RabbitMQMessage>`
      Parameters:
        `endHandler` -
      Returns:
        a reference to this, so the API can be used fluently

    - #### consumerTag

          public String consumerTag()

      Returns:
        a consumer tag

    - #### cancel

          public void cancel()

      Stop message consumption from a queue.

      The operation is asynchronous. When consumption will be stopped, you can by notified via `endHandler(io.vertx.core.Handler<java.lang.Void>)`

    - #### cancel

          public void cancel(Handler<AsyncResult<Void>> cancelResult)

      Stop message consumption from a queue.

      The operation is asynchronous. When consumption will be stopped, you can by notified via `endHandler(io.vertx.core.Handler<java.lang.Void>)`

      Parameters:
        `cancelResult` - contains information about operation status: success/fail.

    - #### rxCancel

          public Completable rxCancel()

      Stop message consumption from a queue.

      The operation is asynchronous. When consumption will be stopped, you can by notified via `endHandler(io.vertx.core.Handler<java.lang.Void>)`

      Returns:

    - #### isPaused

          public boolean isPaused()

      Returns:
        is the stream paused?

    - #### newInstance

          public static RabbitMQConsumer newInstance(RabbitMQConsumer arg)

Copyright © 2018 Eclipse. All rights reserved.