BewareMyPower commented on issue #13965:
URL: https://github.com/apache/pulsar/issues/13965#issuecomment-1023179686
I found another problem with
`subscriptionKeySharedUseConsistentHashing=true`. I changed the C++ tests that
each consumer calls `receive` in a separated thread. After that,
`testMultiTopics` never failed even with
`subscriptionKeySharedUseConsistentHashing=true`.
However, the `testKeyBasedBatching` failed sometimes. In this test, a
producer is created to send messages with interleaved keys and key based
batching. i.e. send: ABABABAB......
Then, two consumers are created to consume these messages. I expect each
consumer can consume a key. However, sometimes it failed with
```
2022-01-27 20:50:02.410 INFO [0x10e646600] KeySharedConsumerTest:149 |
messagesPerConsumer: {0 => 200, 1 => 0}
pulsar-client-cpp/tests/KeySharedConsumerTest.cc:160: Failure
Expected: (fabs(count - expectedMessagesPerConsumer)) <
(expectedMessagesPerConsumer * PERCENT_ERROR), actual: 100 vs 50
pulsar-client-cpp/tests/KeySharedConsumerTest.cc:260: Failure
Expected equality of these values:
messagesPerConsumer[i]
Which is: 200
NUM_MESSAGES_PER_KEY
Which is: 100
````
We can see one consumer received all messages. Is it an expected behavior
when `subscriptionKeySharedUseConsistentHashing=true`? @merlimat
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]