Class SimpleKey

java.lang.Object
de.otto.synapse.message.SimpleKey
All Implemented Interfaces:
Key, Serializable

public final class SimpleKey extends Object implements Key
See Also:
  • Method Details

    • partitionKey

      public String partitionKey()
      Description copied from interface: Key
      Returns the part of the key that is used to select one of possibly several shards or partitions of a message channel.

      All messages with the same partitionKey are guaranteed to keep their ordering.

      Specified by:
      partitionKey in interface Key
      Returns:
      partition key
    • compactionKey

      public String compactionKey()
      Description copied from interface: Key
      Returns the part of the key that is used for message compaction, where a snapshot of a message log is taken by only keeping the latest message for every compaction-key.
      Specified by:
      compactionKey in interface Key
      Returns:
      compaction key
    • isCompoundKey

      public boolean isCompoundKey()
      Specified by:
      isCompoundKey in interface Key
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object