shibd commented on code in PR #17276:
URL: https://github.com/apache/pulsar/pull/17276#discussion_r954855565


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/BatchMessageContainerImpl.java:
##########
@@ -108,6 +108,8 @@ public boolean add(MessageImpl<?> msg, SendCallback 
callback) {
                 }
             } catch (Throwable e) {
                 log.error("construct first message failed, exception is ", e);
+                producer.semaphoreRelease(getNumMessagesInBatch());

Review Comment:
   Maybe we need to throw this exception and then let the producer handle this 
logic.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to