apache/pulsar-client-node

[feature request] Support publish messages to partitioned topics

Opened this issue · 3 comments

Could we provide support for node clients to publish messages partition topics,

  • So publishing messages to partitioned topics, can specify a routing mode. If we not specify any routing mode then round-robin routing mode should be used.

Reference docs supporting the functionality for other client libraries: https://pulsar.apache.org/docs/next/client-libraries-producers/#publish-messages-to-partitioned-topics

Client is based on C++ lib which already supports publishing to partitioned topics transparently.

The routing mode can be selected with the messageRoutingMode property when creating the producer.

Currently the default routing mode is single-partition in the underlying C++ client by default.

Node.js client provides the option to switch the routing mode, see

messageRoutingMode?: MessageRoutingMode;

@yash2 Do you want Customize message router for Node.js client?