Class PropertiesToMetadata

java.lang.Object
interlok.rabbitmq.PropertiesToMetadata
All Implemented Interfaces:
Translator.BasicPropertiesHandler

@ComponentProfile(summary="Store headers from an incoming message as AdaptrisMessage metadata", since="4.3.0") public class PropertiesToMetadata extends Object implements Translator.BasicPropertiesHandler
Add metadata to the message from the BasicProperties object.
  • Constructor Details

    • PropertiesToMetadata

      public PropertiesToMetadata()
  • Method Details

    • handle

      public void handle(com.rabbitmq.client.AMQP.BasicProperties properties, AdaptrisMessage msg)
      Specified by:
      handle in interface Translator.BasicPropertiesHandler
    • withPrefix

      public PropertiesToMetadata withPrefix(String s)
    • getPrefix

      public String getPrefix()
      Set the prefix (if any) for metadata keys when converting BasicProperties#getHeaders().

      Note that standard properties such as BasicProperties#getClusterId() will always be added with the appropriate key from MetadataConstants. This allows us to have predictable behaviour around those properties as required.

    • setPrefix

      public void setPrefix(String prefix)
      Set the prefix (if any) for metadata keys when converting BasicProperties#getHeaders().

      Note that standard properties such as BasicProperties#getClusterId() will always be added with the appropriate key from MetadataConstants. This allows us to have predictable behaviour around those properties as required.