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 2019/08/21 10:08:29 UTC

[GitHub] [pulsar-client-go] banishee opened a new issue #59: setting the SequenceId can't have an effect on Message deduplication

banishee opened a new issue #59: setting the SequenceId can't have an effect on Message deduplication
URL: https://github.com/apache/pulsar-client-go/issues/59
 
 
   #### Expected behavior
   Preparation:  Enabling message deduplication.
    when I initialized the `ProducerMessage{}`,  the `SequenceID` parameter was set to a specific value before I call the `SendAsync()`. So, in theory, the first Message will be received by the broker, and the following Messages will be discarded because of the repeated  SequenceID
   
   #### Actual behavior
   I tested this situation more than one time. However, no messages were discarded.
   
   #### Steps to reproduce
   ```
   for i:=int64(0); i<100; i++ {
   		 ...
   	producer.SendAsync(ctx, &pulsar.ProducerMessage{Payload: msg, SequenceID: &i},func(msgID pulsar.MessageID, message *pulsar.ProducerMessage, e error) {...})
   }
   ```
   I run the code a few times, but the consumer received all messages.
   
   ```
   for i:=int64(0); i<100; i++ {
   		 ...
           k := int64(0)
   	producer.SendAsync(ctx, &pulsar.ProducerMessage{Payload: msg, SequenceID: &k},func(msgID pulsar.MessageID, message *pulsar.ProducerMessage, e error) {...})
   }
   ```
   or like this code, its still not work.
   
   #### System configuration
   docker: apachepulsar/pulsar-standalone:2.3.1 bin/pulsar standalone
   

----------------------------------------------------------------
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


With regards,
Apache Git Services