java.lang.Object
com.github.workerframework.util.rabbitmq.Delivery

public class Delivery extends Object
Structure that contains data and metadata from a RabbitMQ queue delivery.
  • Constructor Details

    • Delivery

      public Delivery(com.rabbitmq.client.Envelope env, byte[] data, Map<String,Object> headers)
      Create a new Delivery, with specific headers.
      Parameters:
      env - the RabbitMQ message envelope
      data - the RabbitMQ message body
      headers - 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 envelope
      data - 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

      public Map<String,Object> getHeaders()
      Returns:
      headers for the message