Class ConsistentHashExchange

All Implemented Interfaces:
Declarable, Exchange

public class ConsistentHashExchange extends AbstractExchange
An AbstractExchange extension for Consistent Hash exchange type.
Since:
3.2
Author:
Artem Bilan
See Also:
  • Constructor Details

    • ConsistentHashExchange

      public ConsistentHashExchange(String name)
      Construct a new durable, non-auto-delete Exchange with the provided name.
      Parameters:
      name - the name of the exchange.
    • ConsistentHashExchange

      public ConsistentHashExchange(String name, boolean durable, boolean autoDelete)
      Construct a new Exchange, given a name, durability flag, auto-delete flag.
      Parameters:
      name - the name of the exchange.
      durable - true if we are declaring a durable exchange (the exchange will survive a server restart)
      autoDelete - true if the server should delete the exchange when it is no longer in use
    • ConsistentHashExchange

      public ConsistentHashExchange(String name, boolean durable, boolean autoDelete, Map<String,Object> arguments)
      Construct a new Exchange, given a name, durability flag, and auto-delete flag, and arguments.
      Parameters:
      name - the name of the exchange.
      durable - true if we are declaring a durable exchange (the exchange will survive a server restart)
      autoDelete - true if the server should delete the exchange when it is no longer in use
      arguments - the arguments used to declare the exchange
  • Method Details

    • setHashHeader

      public void setHashHeader(String headerName)
      Specify a header name from the message to hash.
      Parameters:
      headerName - the header name for hashing.
    • setHashProperty

      public void setHashProperty(String propertyName)
      Specify a property name from the message to hash.
      Parameters:
      propertyName - the property name for hashing.
    • getType

      public String getType()
      Description copied from interface: Exchange
      The type of the exchange. See ExchangeTypes for some well-known examples.
      Specified by:
      getType in interface Exchange
      Specified by:
      getType in class AbstractExchange
      Returns:
      the type of the exchange.