Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Key Shared sample. #350

Open
JimmyBjorklund opened this issue Nov 14, 2023 · 1 comment
Open

Question: Key Shared sample. #350

JimmyBjorklund opened this issue Nov 14, 2023 · 1 comment

Comments

@JimmyBjorklund
Copy link

Looking for a sample on how to setup a producer and consumers using key shared. Using the pulsar node client, the only samples i can find are using java and thy have a key attribute that is not in the node api what i can see.

In the ProducerMessage there is a orderingKey, is this the corresponding key that will be used? When setting the ConsumerConfig.subscriptionType = KeyShared

Thanks for any input.
/J

@shibd
Copy link
Member

shibd commented Nov 15, 2023

In the ProducerMessage there is a orderingKey, is this the corresponding key that will be used? When setting the ConsumerConfig.subscriptionType = KeyShared

Yes. You can refer to: https://pulsar.apache.org/docs/3.1.x/concepts-messaging/#key_shared

It works with orderingKey or partitionKey .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants