Open wanyongx opened 1 year ago
@wanyongx Could you help to provide the code to help reproduce it? Which version were you using? Because version 2.11 is releasing and not promoted.
@mattisonchao correct version is 2.10.2
Producer<byte[]> producer = PulsarClientBuilder.getSslClientBuilder() .ioThreads(8) .build().newProducer(Schema.BYTES) .topic("xxx/default/test") .batcherBuilder(BatcherBuilder.KEY_BASED) .batchingMaxBytes(0) .batchingMaxMessages(500) .batchingMaxPublishDelay(50, TimeUnit.MILLISECONDS) .maxPendingMessages(10000) .blockIfQueueFull(true) .create();
// send one msg per minute
TypedMessageBuilder<byte[]> message = producer.newMessage();
message.key("test");
message.value("test".getBytes(StandardCharsets.UTF_8));
message.sendAsync().exceptionally(throwable -> {
log.error("send message fail throwable: {}", throwable.getMessage());
return null;
});
The issue had no activity for 30 days, mark with Stale label.
Search before asking
Version
2.10.2
Minimal reproduce step
produce one message per minute, probability of production failure。got exceptional within given timeout and cannot consume the failure messages.
produce timeout is default 30s batchingMaxPublishDelay is 50ms
What did you expect to see?
produce success
What did you see instead?
org.apache.pulsar.client.api.PulsarClientException$TimeoutException: The producer pulsar-6-11424 can not send message to the topic persistent://xxx/default/xxx-partition-3 within given timeout
Anything else?
No response
Are you willing to submit a PR?