[
https://issues.apache.org/jira/browse/AMQ-9685?focusedWorklogId=962394&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-962394
]
ASF GitHub Bot logged work on AMQ-9685:
---------------------------------------
Author: ASF GitHub Bot
Created on: 18/Mar/25 18:27
Start Date: 18/Mar/25 18:27
Worklog Time Spent: 10m
Work Description: cshannon commented on PR #1410:
URL: https://github.com/apache/activemq/pull/1410#issuecomment-2734331301
I was testing things out with the different destination creation scenarios
and saw the exception pop up each time so I assumed it was short circuiting the
creation attempt. It was only doing so partially and leaving things half
initialized, I went back and looked and it is first initializing and adding the
destination to the store and then exploding with the errors when the
interceptor is later applied which is why you are seeing the errors.
The code first creates the destination including adding it to the datastore
[here](https://github.com/apache/activemq/blob/9964c95ffef07c73ee4d702c817da6642ff1938e/activemq-broker/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java#L157)
and later when the interceptor wraps the destination and throws an exception
and blows up we run into this same problem. It's breaking at
[this](https://github.com/apache/activemq/blob/9964c95ffef07c73ee4d702c817da6642ff1938e/activemq-broker/src/main/java/org/apache/activemq/broker/region/AbstractRegion.java#L161)
line which causes the rest of the code block not to process...so the
destination is not started and it's not added into the map but the store is
still created.
The real fix would be to just prevent destination creation entirely in this
scenario. This is actually a bigger issue in that if any other interceptor
breaks we run into the same problem. I have a small prototype I'm working on
that I will push up and see what you think.
Issue Time Tracking
-------------------
Worklog Id: (was: 962394)
Time Spent: 1h 20m (was: 1h 10m)
> Empty virtualName from broken queue name
> ----------------------------------------
>
> Key: AMQ-9685
> URL: https://issues.apache.org/jira/browse/AMQ-9685
> Project: ActiveMQ Classic
> Issue Type: Bug
> Components: Broker
> Affects Versions: 5.19.0, 6.1.6
> Reporter: Benjamin Graf
> Priority: Major
> Labels: error, virtualtopic
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Accidentally "invalid" queue name can lead to broken broker after throwing
> "{{Invalid destination name: a non-empty name is required}}"
--
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