<@U078Y59KC3B> does RoutingMode apply server side ...
# ask-ai
k
@RunLLM does RoutingMode apply server side or only in the Pulsar java client? I see that the Pulsar Java client has specific implementations for routing modes (RoundRobin, Single, Custom) but some of the other clients don't, which hints to me that it's actually a client implementation. But I do see the
partition_key
in the Pulsar proto message so curious what that does or if its just metadata
r
RoutingMode (RoundRobin, SinglePartition, CustomPartition) is implemented entirely on the client side, not on the server. The Pulsar Java client (and other clients) determine the partition for each message before sending, using the routing mode logic. The broker simply receives messages for a specific partition and does not perform any routing itself. The
partition_key
(or message key) is used by the client to determine the partition (by hashing), and is also included in the message metadata for use by consumers, but the broker does not use it for routing decisions. According to Pulsar documentation and Java client implementation, routing is handled before the message reaches the broker. The presence of
partition_key
in the protocol is for consumer-side logic and message semantics, not for server-side routing. Would you like more detail on how this works in other clients or the protocol? Sources: - Java client MessageRoutingMode enum 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.