You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/27 23:57:17 UTC

[GitHub] [pulsar] fayce66 commented on issue #9317: pulsar c++ topic compaction with message key does not seem to work

fayce66 commented on issue #9317:
URL: https://github.com/apache/pulsar/issues/9317#issuecomment-768657251


   it still does not work for me, I tried to simplify my code to get closer to your example and I even hard-coded the partition key, but it still does not work. I run the producer for 1 or 2 mins to produce few messages then I launch the consumer expecting only the last message but I get:
   
   ```
   PM|9827|9839|09:47:07.429047|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429175|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429206|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429228|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429256|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429277|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429296|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   PM|9827|9839|09:47:07.429322|INFO|[pm.calib.sub]: new message from [stsd.local] on topic [persistent://xyz/foo/calib]: partition key:[test_key]
   ```
   Also, if I stop the producer and let the consumer receive all the messages, then restart just the consumer to receive the last message with the partition key = 'test_key', I get no messages at all, like I would for a subscription with no topic compaction...
   
   Did you use a newer version of pulsar than 2.7.0? This is the version that I am using now.


----------------------------------------------------------------
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:
users@infra.apache.org