pulsar-client-cpp icon indicating copy to clipboard operation
pulsar-client-cpp copied to clipboard

disableReplication in MessageBuilder does not work in PulsarClient C++ and Java

Open tuan6956 opened this issue 5 years ago • 4 comments

Describe the bug Data is still replicated when disableReplication is enabled

To Reproduce Steps to reproduce the behavior:

  1. Setup Geo-Replication with 3 cluster(A,B,C)
  2. Set disableReplication = true in MessageBuilder
Message msg = MessageBuilder().setContent("repl").disableReplication(true).build();
  1. Producer create connect in cluster C and send Message msg
producer.sendAsync(msg, notifySendMessage);

Actual output is consumer

  1. Cluster A
Received message: repl
  1. Cluster A
Received message: repl
  1. Cluster C
Received message: repl

Expected output is

  1. Cluster A
  1. Cluster A
  1. Cluster C
Received message: repl

Pulsar version: 2.3.0

tuan6956 avatar Mar 22 '19 04:03 tuan6956

@tuan6956 It should be disableReplication(true) rather than false

merlimat avatar Mar 22 '19 04:03 merlimat

@merlimat sorry, i edited disableReplication(true) but it does not work

tuan6956 avatar Mar 22 '19 05:03 tuan6956

@BewareMyPower Could you please help take a look at this issue?

codelipenghui avatar Oct 26 '20 02:10 codelipenghui

@codelipenghui ok, I have to make a test first.

BewareMyPower avatar Oct 26 '20 02:10 BewareMyPower