Class RabbitMQConsumer

    • Field Detail

      • __TYPE_ARG

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

      • RabbitMQConsumer

        public RabbitMQConsumer​(Object delegate)
    • Method Detail

      • hashCode

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

        public Pipe<RabbitMQMessage> pipe()
        Pause this stream and return a to transfer the elements of this stream to a destination .

        The stream will be resumed when the pipe will be wired to a WriteStream.

        Specified by:
        pipe in interface ReadStream<RabbitMQMessage>
        Returns:
        a pipe
      • pipeTo

        public Future<Void> pipeTo​(WriteStream<RabbitMQMessage> dst)
        Pipe this ReadStream to the WriteStream.

        Elements emitted by this stream will be written to the write stream until this stream ends or fails.

        Specified by:
        pipeTo in interface ReadStream<RabbitMQMessage>
        Parameters:
        dst - the destination write stream
        Returns:
        a future notified when the write stream will be ended with the outcome
      • rxPipeTo

        public Completable rxPipeTo​(WriteStream<RabbitMQMessage> dst)
        Pipe this ReadStream to the WriteStream.

        Elements emitted by this stream will be written to the write stream until this stream ends or fails.

        Specified by:
        rxPipeTo in interface ReadStream<RabbitMQMessage>
        Parameters:
        dst - the destination write stream
        Returns:
        a future notified when the write stream will be ended with the outcome
      • 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
      • 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
      • queueName

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

        public RabbitMQConsumer setQueueName​(String name)
        Set the name of the queue. This method is typically only required during a connectionEstablishedCallback when the queue name has changed.
        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
      • isCancelled

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

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

        public RabbitMQConsumer 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