Package io.micronaut.rabbitmq.bind
Class RabbitConsumerState
- java.lang.Object
-
- io.micronaut.rabbitmq.bind.RabbitConsumerState
-
public class RabbitConsumerState extends java.lang.ObjectStores 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.ChannelgetChannel()This channel is being used exclusively by the consumer that consumed this message.com.rabbitmq.client.EnvelopegetEnvelope()com.rabbitmq.client.AMQP.BasicPropertiesgetProperties()
-
-
-
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 envelopeproperties- The propertiesbody- The bodychannel- 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
-
-