flowchartsman opened a new issue #447:
URL: https://github.com/apache/pulsar-client-go/issues/447
I'm getting "message too large" messages on some large JSON documents that,
when compressed, are nowhere near the limit.
in `producer_partiton.go`:
```go
// if msg is too large
if len(payload) > int(p.cnx.GetMaxMessageSize()) {
p.publishSemaphore.Release()
request.callback(nil, request.msg, errMessageTooLarge)
p.log.WithError(errMessageTooLarge).
WithField("size", len(payload)).
WithField("properties", msg.Properties).
Error()
p.metrics.PublishErrorsMsgTooLarge.Inc()
return
}
```
Correct me if I'm wrong, but this appears to check the payload size before
any compression.
Whereas in `ProducerImpl.java`:
```java
int compressedSize = compressedPayload.readableBytes();
if (compressedSize > ClientCnx.getMaxMessageSize() &&
!this.conf.isChunkingEnabled()) {
compressedPayload.release();
```
----------------------------------------------------------------
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]