Class RabbitConsumerState


  • public class RabbitConsumerState
    extends java.lang.Object
    Stores the state of a RabbitMQ message to be consumed. This class should be treated as immutable.
    Since:
    1.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      RabbitConsumerState​(com.rabbitmq.client.Envelope envelope, com.rabbitmq.client.AMQP.BasicProperties properties, byte[] body, com.rabbitmq.client.Channel channel)
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getBody()  
      com.rabbitmq.client.Channel getChannel()
      This channel is being used exclusively by the consumer that consumed this message.
      com.rabbitmq.client.Envelope getEnvelope()  
      com.rabbitmq.client.AMQP.BasicProperties getProperties()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RabbitConsumerState

        public RabbitConsumerState​(com.rabbitmq.client.Envelope envelope,
                                   com.rabbitmq.client.AMQP.BasicProperties properties,
                                   byte[] body,
                                   com.rabbitmq.client.Channel channel)
        Default constructor.
        Parameters:
        envelope - The envelope
        properties - The properties
        body - The body
        channel - The channel that consumed the message
    • Method Detail

      • getBody

        public byte[] getBody()
        Returns:
        The body
      • getProperties

        @NonNull
        public com.rabbitmq.client.AMQP.BasicProperties getProperties()
        Returns:
        The properties
      • getEnvelope

        @NonNull
        public com.rabbitmq.client.Envelope getEnvelope()
        Returns:
        The envelope
      • getChannel

        public com.rabbitmq.client.Channel getChannel()
        This channel is being used exclusively by the consumer that consumed this message. Attempts to use this channel for any purpose other than acknowledgement may result in errors because channels are not thread safe.
        Returns:
        The channel