After discussion with mtaylor1@redhat.com about possible valid variants in routing types (RT) of address::queue, we found a following bug:
When created a multicast address, broker should not create an anycast queue bound to it. By design and what is valid RT variant. This is being ignored in hawtio console, even when all "auto-create-*" is set to false. hawtio simply ignores these settings and allows this, while updating the RT of originally created address. Example follows:
- Create a multicast RT address 'mcast_addr'
- Observe that RT of that address is only MULTICAST
- Create an anycast RT queue 'acast_q' bound to this address 'mcast_addr'
- Observe that original RT of address has changed to MULTICAST and ANYCAST
This should not happen as it is not happening via direct JMX call
java -jar /var/dtests/node_data/clients/amqx.jar address --action add --name jmx_addr_mcast -r multicast Address 'jmx_addr_mcast' created java -jar /var/dtests/node_data/clients/amqx.jar queue --action add --name jmx_q_acast --address jmx_addr_mcast Unable to add queue: AMQ119207: Can not create queue with routing type: ANYCAST, Supported routing types for address: jmx_addr_mcast are [MULTICAST] java.lang.IllegalArgumentException: AMQ119207: Can not create queue with routing type: ANYCAST, Supported routing types for address: jmx_addr_mcast are [MULTICAST] at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:2560) at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:1574) at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:1559) at org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl.createQueue(ActiveMQServerControlImpl.java:767) at org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl.createQueue(ActiveMQServerControlImpl.java:745) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:83) at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:287) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:124) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:58) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:249) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:150) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:264) at javax.management.StandardMBean.invoke(StandardMBean.java:416) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:831) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:813) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1479) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:87) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1320) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1412) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:840) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:508) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:374) at sun.rmi.transport.Transport$1.run(Transport.java:212) at sun.rmi.transport.Transport$1.run(Transport.java:209) at java.security.AccessController.doPrivileged(AccessController.java:686) at sun.rmi.transport.Transport.serviceCall(Transport.java:208) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:580) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:838) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:695) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$24.000000009400AD00.run(Unknown Source) at java.security.AccessController.doPrivileged(AccessController.java:620) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:694) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1160) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.lang.Thread.run(Thread.java:785)
Similar/same error should be reported to user in scenario above.