This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-5.16.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-5.16.x by this push:
new de0b4d228 Quote queue names so that web console shows correct results
for queue`s producers/subscribers
de0b4d228 is described below
commit de0b4d228085a8b7eec448828889de91a2b2de2c
Author: Yury Gubernatorov <[email protected]>
AuthorDate: Tue Dec 28 12:46:24 2021 -0800
Quote queue names so that web console shows correct results for queue`s
producers/subscribers
(cherry picked from commit bb375895dee8b6f9dcf89b44c074929c58a854a9)
---
.../main/java/org/apache/activemq/web/BrokerFacadeSupport.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
b/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
index 014dd7726..09e7c9f3d 100644
---
a/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
+++
b/activemq-web/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
@@ -240,8 +240,8 @@ public abstract class BrokerFacadeSupport implements
BrokerFacade {
public Collection<SubscriptionViewMBean> getQueueConsumers(String
queueName) throws Exception {
String brokerName = getBrokerName();
queueName = StringUtils.replace(queueName, "\"", "_");
- ObjectName query = new
ObjectName("org.apache.activemq:type=Broker,brokerName=" + brokerName
- + ",destinationType=Queue,destinationName=" + queueName +
",endpoint=Consumer,*");
+ ObjectName query = new
ObjectName("org.apache.activemq:type=Broker,brokerName=\"" + brokerName
+ + "\",destinationType=Queue,destinationName=\"" + queueName +
"\",endpoint=Consumer,*");
Set<ObjectName> queryResult = queryNames(query, null);
return getManagedObjects(queryResult.toArray(new
ObjectName[queryResult.size()]), SubscriptionViewMBean.class);
}
@@ -251,8 +251,8 @@ public abstract class BrokerFacadeSupport implements
BrokerFacade {
public Collection<ProducerViewMBean> getQueueProducers(String queueName)
throws Exception {
String brokerName = getBrokerName();
queueName = StringUtils.replace(queueName, "\"", "_");
- ObjectName query = new
ObjectName("org.apache.activemq:type=Broker,brokerName=" + brokerName
- + ",destinationType=Queue,destinationName=" + queueName +
",endpoint=Producer,*");
+ ObjectName query = new
ObjectName("org.apache.activemq:type=Broker,brokerName=\"" + brokerName
+ + "\",destinationType=Queue,destinationName=\"" + queueName +
"\",endpoint=Producer,*");
Set<ObjectName> queryResult = queryNames(query, null);
return getManagedObjects(queryResult.toArray(new
ObjectName[queryResult.size()]), ProducerViewMBean.class);
}