merlimat commented on a change in pull request #5491: Fix message deduplicate
issue while using external sequence id with batch produce
URL: https://github.com/apache/pulsar/pull/5491#discussion_r340894556
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/client/api/ClientDeduplicationFailureTest.java
##########
@@ -241,7 +241,11 @@ public void
testClientDeduplicationCorrectnessWithFailure() throws Exception {
producerThread.stop();
// send last message
- producer.newMessage().sequenceId(producerThread.getLastSeqId() +
1).value("end").send();
+ try {
+ producer.newMessage().sequenceId(producerThread.getLastSeqId() +
1).value("end").send();
+ fail("should failed, because send a duplication");
+ } catch (PulsarClientException.InvalidMessageException ignore) {
Review comment:
I don't think this is a valid assumption. The logic of dedup is to
transparently perform the deduplication, without giving error to the
application in case of duplicates.
----------------------------------------------------------------
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]
With regards,
Apache Git Services