You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Timothy A. Bish (Jira)" <ji...@apache.org> on 2022/11/07 20:31:00 UTC

[jira] [Resolved] (PROTON-2646) [protonj2] Message not sent with multiple senders on the same session

     [ https://issues.apache.org/jira/browse/PROTON-2646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy A. Bish resolved PROTON-2646.
-------------------------------------
    Fix Version/s: protonj2-1.0.0-M11
       Resolution: Fixed

> [protonj2] Message not sent with multiple senders on the same session
> ---------------------------------------------------------------------
>
>                 Key: PROTON-2646
>                 URL: https://issues.apache.org/jira/browse/PROTON-2646
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: protonj2
>            Reporter: Marco Geri
>            Assignee: Timothy A. Bish
>            Priority: Major
>             Fix For: protonj2-1.0.0-M11
>
>
> With the following scenario:
>  * create multiple senders on the same session
>  * create senders with delivery mode {{DeliveryMode.AT_MOST_ONCE}}
>  * set a small session outgoing window size so that it can complete under pressure
>  * senders do not await settlement
>  * send many messages from many senders filling the size of the outgoing window 
> When the outgoing window size is complete, the {{ClientSender.sendMessage}} puts the message in a blocking queue and waits for the message to be sent, but when the outgoing window size decreases the ClientSender does not send the message in the blocking queue, and the sendMessage still waits for the message to be sent over the connection.
> With some debugging, it seems the problem is around in the ProtonSender.
> When sending the message, the ClientSender checks {{{}ProtonSender.isSendable{}}}:
> {code:java}
> public boolean isSendable() {
>   return sendable && sessionWindow.isSendable();
> } {code}
> The {{ProtonSender.sendable}} is true, but the function returns false because the size of the outgoing window is complete.
> When the outgoing size decreases, it seems the following ProtonSender handler is called:
> {code:java}
> ProtonSender handleSessionCreditStateUpdate(ProtonSessionOutgoingWindow protonSessionOutgoingWindow) {
>         final boolean previousSendable = sendable;
>         sendable = getCredit() > 0 && sessionWindow.isSendable();
>         if (previousSendable != sendable) {
>             signalLinkCreditStateUpdated();
>         }
>         return this;
>     }
> {code}
> But the {{signalLinkCreditStateUpdated}} is not called because the {{previousSendable}} and {{sendable}} are both true, leaving the message in the blocking queue waiting to be sent.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org