You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by gi...@git.apache.org on 2017/06/30 03:05:07 UTC
[GitHub] msb-at-yahoo commented on a change in pull request #541: Message size validation on post compression
msb-at-yahoo commented on a change in pull request #541: Message size validation on post compression
URL: https://github.com/apache/incubator-pulsar/pull/541#discussion_r124956427
##########
File path: pulsar-client-cpp/lib/ProducerImpl.cc
##########
@@ -268,6 +264,14 @@ void ProducerImpl::sendAsync(const Message& msg, SendCallback callback) {
// If batching is enabled we compress all the payloads together before sending the batch
payload = CompressionCodecProvider::getCodec(conf_.getCompressionType()).encode(payload);
}
+ uint32_t compressedSize = payload.readableBytes();
+ if (compressedSize > Commands::MaxMessageSize) {
+ if (conf_.getBlockIfQueueFull()) {
Review comment:
why this check?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services