Queue names are globally unique. You cannot have two queues with the same name on two different addresses. This is covered in the documentation [1].
In any case, you can use org.apache.activemq.artemis.api.core.management.ResourceNames class to help build the proper resource name. In your case you'd use ResourceNames.QUEUE, e.g.: ManagementHelper.putOperationInvocation(session.createMessage(true), ResourceNames.QUEUE + "Q", "moveMessages", filter, anotherQueue); That said, passing in "session.createMessage(true)" means you won't have a handle to actually use the message once the management helper has done its work. Justin [1] https://activemq.apache.org/components/artemis/documentation/latest/address-model.html#queue On Fri, Mar 24, 2023 at 5:21 PM Thai Le <lnthai2...@gmail.com> wrote: > Hello, > > I have 2 queues with the same name Q, one in address A1 and one in address > A2. How do I make a *resource name* of queue Q in A1 ? I'm trying to use > the java artemis client to do some management operations and i need the > resource name for: > ManagementHelper.putOperationInvocation(session.createMessage(true), > *resourceName*, "moveMessages", filter, anotherQueue) > > Thank you in advance > > Thai Le >