[
https://issues.apache.org/jira/browse/ARTEMIS-5689?focusedWorklogId=985901&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-985901
]
ASF GitHub Bot logged work on ARTEMIS-5689:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 06/Oct/25 12:05
Start Date: 06/Oct/25 12:05
Worklog Time Spent: 10m
Work Description: gemmellr commented on code in PR #5950:
URL: https://github.com/apache/activemq-artemis/pull/5950#discussion_r2405945258
##########
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPTunneledCoreLargeMessageWriter.java:
##########
@@ -219,15 +219,14 @@ private boolean trySendDeliveryAnnotations(ByteBuf
frameBuffer, NettyReadable fr
for (; protonSender.getLocalState() != EndpointState.CLOSED && state ==
State.STREAMING_DELIVERY_ANNOTATIONS; ) {
if (annotations != null && annotations.getValue() != null &&
!annotations.getValue().isEmpty()) {
if (!connection.flowControl(this::resume)) {
- break; // Resume will restart writing the headers section from
where we left off.
+ break; // Resume will restart writing the delivery annotations
section from where we left off.
}
final ByteBuf annotationsBuffer =
getOrCreateDeliveryAnnotationsBuffer();
- final int readSize = (int) Math.min(frameBuffer.writableBytes(),
annotationsBuffer.readableBytes() - position);
+ final int readSize = Math.min(frameBuffer.writableBytes(),
annotationsBuffer.readableBytes());
- position += readSize;
-
- annotationsBuffer.readBytes(frameBuffer, readSize);
+
annotationsBuffer.readBytes(frameBuffer.internalNioBuffer(frameBuffer.writerIndex(),
readSize));
+ frameBuffer.writerIndex(frameBuffer.writerIndex() + readSize);
Review Comment:
Ok, that seems reasonable, I just couldnt see why the change happened so I
asked :) I see you later switched it out anyway though, so I'll just merge
this as it is now.
Issue Time Tracking
-------------------
Worklog Id: (was: 985901)
Time Spent: 40m (was: 0.5h)
> Tunneling Core Large Messages over broker connections can fail in some cases
> ----------------------------------------------------------------------------
>
> Key: ARTEMIS-5689
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5689
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: AMQP
> Affects Versions: 2.42.0
> Reporter: Timothy A. Bish
> Assignee: Timothy A. Bish
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.43.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> If the encoded delivery annotations or the Core encoded headers and
> properties are larger than the frame buffer and need to be written in chunks
> an error in the write loop can lead to an exception that fails the send of
> that message.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact