This is an automated email from the ASF dual-hosted git repository.
mattrpav pushed a commit to branch activemq-6.3.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-6.3.x by this push:
new 666c24a785 [#2406] Guard against null region subscriptions in
duplicate suppression (#2417)
666c24a785 is described below
commit 666c24a785f00b23323196e7b3fe0393c1b14064
Author: Matt Pavlovich <[email protected]>
AuthorDate: Wed Aug 5 20:08:18 2026 -0500
[#2406] Guard against null region subscriptions in duplicate suppression
(#2417)
getRegionSubscriptions returns null when the destination's region is not
an AbstractRegion; duplicateSuppressionIsRequired iterated the result
unconditionally, throwing NPE on the advisory path and tearing down the
bridge. Treat a null view as nothing to compare against.
(cherry picked from commit 5b0f3fa822bf1f95540524262117d829d4820507)
---
.../network/DemandForwardingBridgeSupport.java | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git
a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
index 0ca4cc2fce..86dda092d4 100644
---
a/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
+++
b/activemq-broker/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
@@ -1583,17 +1583,21 @@ public abstract class DemandForwardingBridgeSupport
implements NetworkBridge, Br
}
List<ConsumerId> candidateConsumers =
consumerInfo.getNetworkConsumerIds();
+ // null when the destination's region is not an AbstractRegion (no
+ // subscription view available) - nothing to compare against
Collection<Subscription> currentSubs =
getRegionSubscriptions(consumerInfo.getDestination());
- for (Subscription sub : currentSubs) {
- List<ConsumerId> networkConsumers =
sub.getConsumerInfo().getNetworkConsumerIds();
- if (!networkConsumers.isEmpty()) {
- if (matchFound(candidateConsumers, networkConsumers)) {
- if (isInActiveDurableSub(sub)) {
- suppress = false;
- } else {
- suppress = hasLowerPriority(sub,
candidate.getLocalInfo());
+ if (currentSubs != null) {
+ for (Subscription sub : currentSubs) {
+ List<ConsumerId> networkConsumers =
sub.getConsumerInfo().getNetworkConsumerIds();
+ if (!networkConsumers.isEmpty()) {
+ if (matchFound(candidateConsumers, networkConsumers)) {
+ if (isInActiveDurableSub(sub)) {
+ suppress = false;
+ } else {
+ suppress = hasLowerPriority(sub,
candidate.getLocalInfo());
+ }
+ break;
}
- break;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact