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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProducerBuilder.RoutingConfiguration
hash()
Enable the "hash" routing strategy (the default).ProducerBuilder.RoutingConfiguration
hash(ToIntFunction<String> hash)
Enable the "hash" routing strategy with a specific hash algorithm.ProducerBuilder.RoutingConfiguration
key()
Enable the "key" routing strategy.ProducerBuilder
producerBuilder()
Go back to the producer builder.ProducerBuilder.RoutingConfiguration
strategy(RoutingStrategy routingStrategy)
Set the routing strategy to use.
-
-
-
Method Detail
-
hash
ProducerBuilder.RoutingConfiguration hash()
Enable the "hash" routing strategy (the default).The default hash algorithm is 32-bit MurmurHash3.
- Returns:
- the routing configuration instance
-
hash
ProducerBuilder.RoutingConfiguration hash(ToIntFunction<String> hash)
Enable the "hash" routing strategy with a specific hash algorithm.- Parameters:
hash
-- Returns:
- the routing configuration instance
-
key
ProducerBuilder.RoutingConfiguration 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
ProducerBuilder.RoutingConfiguration strategy(RoutingStrategy routingStrategy)
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
-
-