You can publish to partitioned topics using Pulsar client libraries and you can partitioned topics using Pulsar admin API.
When publishing to partitioned topics, you do not need to explicitly specify a when you create a new producer. If you do not specify a routing mode, the round robin route mode is used. Take Java as an example.
You can specify the routing mode in the ProducerConfiguration object that you use to configure your producer. Three options are available:
The following is an example:
The following router routes every message to partition 10:
有了这个实现,你可以这样发送消息:
Manage partitioned topics
You can use Pulsar admin API to create and manage .