pulsar-client-node icon indicating copy to clipboard operation
pulsar-client-node copied to clipboard

[feature request] Support publish messages to partitioned topics

Open yash2 opened this issue 1 year ago • 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

yash2 avatar May 09 '24 01:05 yash2

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.

merlimat avatar May 09 '24 01:05 merlimat

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 https://github.com/apache/pulsar-client-node/blob/2d659d2b2850fc92ec58ff700e04f966b0771e6a/index.d.ts#L55

BewareMyPower avatar May 10 '24 10:05 BewareMyPower

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

shibd avatar May 15 '24 09:05 shibd