Class RabbitConsumerState

java.lang.Object
io.micronaut.rabbitmq.bind.RabbitConsumerState

public class RabbitConsumerState extends Object
Stores the state of a RabbitMQ message to be consumed. This class should be treated as immutable.
Since:
1.1.0
Author:
James Kleeh
  • 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

    Modifier and Type
    Method
    Description
    byte[]
     
    com.rabbitmq.client.Channel
    This channel is being used exclusively by the consumer that consumed this message.
    @NonNull com.rabbitmq.client.Envelope
     
    com.rabbitmq.client.AMQP.BasicProperties
     

    Methods inherited from class java.lang.Object

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

    • 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 Details

    • getBody

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

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

      @NonNull public @NonNull 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