leiless commented on issue #10832: URL: https://github.com/apache/pulsar/issues/10832#issuecomment-857300418
> I believe that with `.blockIfQueueFull(true)` the chances for ordering problems is not a big concern. According to docs of [`flush()`](https://pulsar.apache.org/api/client/2.7.0-SNAPSHOT/org/apache/pulsar/client/api/Producer.html#flush--): > Flush all the messages **buffered in the client** and wait until all messages have been successfully persisted. If a message already failed, it won't be in the buffered list since it has been handled? so if you check the `CompletableFuture` and retry send after `flush()`, the order might be broken? Since previously sent messages already persisted in Pulsar Broker, if there's any subscription, those sent messages may have been consumed and ACK-ed by the consumer. (assume `exclusive` mode) And then our retry succeeds(persisted in Pulsar broker), the order seems broken? One thing worth mention: I've set `sequenceId()` for each message, in my use case, the `seqId` is monotonically increasing. -- 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]
