gtully commented on code in PR #4240:
URL: https://github.com/apache/activemq-artemis/pull/4240#discussion_r985928699
##########
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java:
##########
@@ -558,6 +564,21 @@ public void physicalSend(Command command) throws
IOException {
}
+ private void chunkSend(final ByteSequence bytes, final int bufferSize,
final int maxPacketSize) {
+ if (logger.isTraceEnabled()) {
+ logger.trace("Sending a big packet sized as {} with smaller packets
of {}", bufferSize, maxPacketSize);
+ }
+ for (int posBuffer = 0; posBuffer < bufferSize; posBuffer +=
maxPacketSize) {
+ int chunkSize = Math.min(bufferSize - posBuffer, maxPacketSize);
+ if (logger.isTraceEnabled()) {
+ logger.trace("Sending a partial packet of {} bytes, starting at
{}", chunkSize, posBuffer);
+ }
+ final ActiveMQBuffer buffer =
transportConnection.createTransportBuffer(chunkSize);
Review Comment:
makes sense, it can't be in the pipeline twice.
--
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]