Interface JmsMessageIDBuilder


  • public interface JmsMessageIDBuilder
    Interface for creating a custom Message ID builder to populate the Message ID field of the outgoing message.
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.lang.Object createMessageID​(java.lang.String producerId, long messageSequence)
      Create and return a new Message ID value.
      default JmsMessageIDBuilder initialize​(java.lang.String producerId)
      Provides an initialization point for Message ID builders in order for them to be able to better optimize the creation of the ID values depending on the implementation of the builder.
    • Method Detail

      • createMessageID

        java.lang.Object createMessageID​(java.lang.String producerId,
                                         long messageSequence)
        Create and return a new Message ID value. The returned value must be a valid AMQP Message ID type.
        Parameters:
        producerId - The String ID value for the producer that is sending the message,
        messageSequence - The producer assigned sequence number for the outgoing message.
        Returns:
        and Object value that will be assigned as the Message ID.
      • initialize

        default JmsMessageIDBuilder initialize​(java.lang.String producerId)
        Provides an initialization point for Message ID builders in order for them to be able to better optimize the creation of the ID values depending on the implementation of the builder. For builders that are created in a one per producer fashion this methods is given the producer Id that the builder will be assigned to which can allow for caching a custom id encoding etc.
        Parameters:
        producerId - The unique Id of a producer object that will be using the builder.
        Returns:
        the builder instance for chaining.