Class Delivery
java.lang.Object
com.github.workerframework.util.rabbitmq.Delivery
Structure that contains data and metadata from a RabbitMQ queue delivery.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.rabbitmq.client.Envelope
byte[]
-
Constructor Details
-
Delivery
Create a new Delivery, with specific headers.- Parameters:
env
- the RabbitMQ message envelopedata
- the RabbitMQ message bodyheaders
- the string-mapped key/value headers
-
Delivery
public Delivery(com.rabbitmq.client.Envelope env, byte[] data) Create a new Delivery without headers.- Parameters:
env
- the RabbitMQ message envelopedata
- the RabbitMQ message body
-
-
Method Details
-
getEnvelope
public com.rabbitmq.client.Envelope getEnvelope()- Returns:
- the envelope containing metadata about the delivery
-
getMessageData
public byte[] getMessageData()- Returns:
- the message delivery itself
-
getHeaders
- Returns:
- headers for the message
-