apache / apache/activemq

Improve DestinationInterceptor reappliance to respect DestinationFilters

Open
#1,870 1 comment 0 reactions 1 assignee Claimed by @mattrpav View on GitHub
Dominant language
Java
Stars
2.5k
Forks
1.5k
Avg merge
10h 46m
Merged PRs (30d)
79

Description

Abstract.reapplyInterceptor unwraps only outer CompositeDestinationFilter, but totally ignores other DestinationFilter instances.
This behaviour applies to all recent version of ActiveMQ.

It might be easily fixed by changing this code^
```java
if (destination instanceof CompositeDestinationFilter) {
destination = ((CompositeDestinationFilter) destination).next;
}
```
to
```java
while (destination instanceof org.apache.activemq.broker.region.DestinationFilter) {
destination = ((org.apache.activemq.broker.region.DestinationFilter) destination).next;
}
```
or
```java
if (destination instanceof org.apache.activemq.broker.region.DestinationFilter) {
destination = ((org.apache.activemq.broker.region.DestinationFilter) destination).getAdaptor(BaseDestination.class);
}
```

It's desirable to fix this in 5.19.x.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.