psisoyev opened a new issue #9881: URL: https://github.com/apache/pulsar/issues/9881
**Describe the bug** According to https://github.com/apache/pulsar/pull/4462 `non-persistent` topics should have the support of KeyShared subscriptions. However, it seems it doesn't work (at least in Java client). **To Reproduce** Steps to reproduce the behavior: 0. Using the official `pulsar-client` 2.7.0 1. Create a producer for non-persistent topic 2. Create a consumer for the same topic 3. Send a new message with `key` 4. Observe the fact consumer will never receive the message Repeating the same exercise with a `persistent` topic has a different result. **Expected behavior** Consumer should receive the message as it is happening with `persistent` topic. **Additional context** Using Pulsar image `kafkaesqueio/pulsar:2.7.0-kesque-1` and `pulsar-client` Java library of version 2.7.0. Code sample (in Scala): ``` val topic = "non-persistent://public/default/topic-1" // try changing to persistent val producer = client.newProducer().topic(topic).create() val consumer = client .newConsumer() .topic(topic) .subscriptionType(SubscriptionType.Key_Shared) .subscriptionName("my-sub") .subscribe() val msg = "Hello".getBytes(Charset.defaultCharset()) producer.newMessage().key("key-1").value(msg).send() val received = consumer.receive() val result = new String(received.getData, Charset.defaultCharset()) println(result) ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
