I've tried to get the list of currently active HornetQ
queues like this:
ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(), getConfigMap()));
ClientSessionFactory factory = locator.createSessionFactory();
ClientSession session = return factory.createSession(true, true, 0);
ClientSession.BindingQuery result = session.bindingQuery(new SimpleString("localhost"));
System.out.println(result.getQueueNames().size());
But it returns 0
. Looks like I've performed wrong BindingQuery
but I didn't find any examples in documentation.
The address here in question is not the IP address.
in HornetQ core queue we have the concept of queues, and each queue (core-queue) will be bound to an address. on this case multiple queues will belong to a single address.
Example:
address: Invoice Queue1: manufacture-invoice Queue2: printing-invoice Queue3: Delivery-invoice
So, you send the messages to the address invoice and each queue will receive the message.
If you want to locate what addresses and queues you have you have to look at management operations, not through the client core-API. The specific API you executed is meant to find the existance of queues on that Address using this concept.
Try playing with JMX Methods to list the queues, or with ManagementServices::getResources(Class classType);
You could also using AS7 management operations or the management console.