Hello,
I am using ActiveMQClient to talk to the artemis broker. I am trying to
move all the messages in a topic to another topic programmatically. The
only pieces of info I have is the broker URL, username, password and the
topic name (the address). However, since there are quite a number of
subscribers to this topic, I want to get the list of queues associated with
the address and run the move operation on each of them. Unfortunately, i do
not see any operation that return the list of queues associated with the
address (topic). Here is my current code:
> try (ServerLocator locator =
> ActiveMQClient.createServerLocator(broker.getUrl()); ClientSessionFactory
> factory = locator.createSessionFactory(); ClientSession session =
> factory.createSession(broker.getAdmin(), broker.getAdminPassword(), false,
> true, true, true, 10);) {
>
> ClientRequestor requestor = new ClientRequestor(session,
> "activemq.management"); ClientMessage message = session.createMessage(true);
> ManagementHelper.putOperationInvocation(
> message
> , String.format("%s%s", ResourceNames.ADDRESS, oldTopicAddress)
> , "?????"); session.start(); ClientMessage reply =
> requestor.request(message); requestor.close(); return
> extractQueueNames(reply);
>
> Hope to get some hint
Thai Le