You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by clebertsuconic <gi...@git.apache.org> on 2018/10/24 14:33:45 UTC
[GitHub] activemq-artemis pull request #2393: ARTEMIS-2146 Avoiding NPE on AMQP Flow ...
GitHub user clebertsuconic opened a pull request:
https://github.com/apache/activemq-artemis/pull/2393
ARTEMIS-2146 Avoiding NPE on AMQP Flow Control
AMQP Flow control will disable consumer flow control (setting credits to null)
This will avoid a race checking flow control.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/clebertsuconic/activemq-artemis ARTEMIS-2146
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/2393.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2393
----
commit 1c91539bad06f96b3ebee84b900b8dcdb1d66d94
Author: Clebert Suconic <cl...@...>
Date: 2018-10-23T16:43:36Z
ARTEMIS-2146 Avoiding NPE on AMQP Flow Control
AMQP Flow control will disable consumer flow control (setting credits to null)
This will avoid a race checking flow control.
----
---
[GitHub] activemq-artemis pull request #2393: ARTEMIS-2146 Avoiding NPE on AMQP Flow ...
Posted by franz1981 <gi...@git.apache.org>.
Github user franz1981 commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2393#discussion_r227822843
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java ---
@@ -349,7 +349,9 @@ public boolean supportsDirectDelivery() {
@Override
public HandleStatus handle(final MessageReference ref) throws Exception {
- if (callback != null && !callback.hasCredits(this) || availableCredits != null && availableCredits.get() <= 0) {
+ // available credits can be set back to null with a flow control option.
+ AtomicInteger checkInteger = availableCredits;
--- End diff --
nice!
---
[GitHub] activemq-artemis pull request #2393: ARTEMIS-2146 Avoiding NPE on AMQP Flow ...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/activemq-artemis/pull/2393
---