Package com.rabbitmq.stream
Interface ProducerBuilder.RoutingConfiguration
- Enclosing interface:
ProducerBuilder
public static interface ProducerBuilder.RoutingConfiguration
Routing configuration for super streams (partitioned streams).
This is an experimental API, subject to change.
-
Method Summary
Modifier and TypeMethodDescriptionhash()
Enable the "hash" routing strategy (the default).hash
(ToIntFunction<String> hash) Enable the "hash" routing strategy with a specific hash algorithm.key()
Enable the "key" routing strategy.Go back to the producer builder.strategy
(RoutingStrategy routingStrategy) Set the routing strategy to use.
-
Method Details
-
hash
Enable the "hash" routing strategy (the default).The default hash algorithm is 32-bit MurmurHash3.
- Returns:
- the routing configuration instance
-
hash
Enable the "hash" routing strategy with a specific hash algorithm.- Parameters:
hash
-- Returns:
- the routing configuration instance
-
key
Enable the "key" routing strategy.It consists in using the "route" command of the RabbitMQ Stream protocol to determine the streams to send a message to.
- Returns:
- the routing configuration instance
-
strategy
Set the routing strategy to use.Providing the routing strategy provides control over the streams a message is routed to (routing key extraction logic if relevant and destination(s) decision).
- Parameters:
routingStrategy
-- Returns:
- the routing configuration instance
-
producerBuilder
ProducerBuilder producerBuilder()Go back to the producer builder.- Returns:
- the producer builder
-