Interface MessageKeyGenerator

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface MessageKeyGenerator
    Dave Syer, Gary Russell
    • Method Detail

      • getKey

        Object getKey​(Message message)
        Generate a unique key for the message that is repeatable on redelivery. Implementations should be very careful about assuming uniqueness of any element of the message, especially considering the requirement that it be repeatable. A message id is ideal, but may not be present (AMQP does not mandate it), and the message body is a byte array whose contents might be repeatable, but its object value is not.
        message - the message to generate a key for
        a unique key for this message