Hi all,
I'm making a small project using cms and hornetQ, and although I looked in the documentation I couldn't find a way to display the message count of the queues I use, apparently because such method does not exist in cms. That's why I'm gonna use JMS in another program to display that information.
Having a Username, Password, QueueName and Port of my queue written in c++, how can I connect it to a java program to obtain the queue depth?
For what i've read in the examples on JMS, something that could be interesting is in message-counter.java:
ObjectName on = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queue.getQueueName());
JMXConnector connector = JMXConnectorFactory.connect(new JMXServiceURL(JMX_URL), new HashMap());
MBeanServerConnection mbsc = connector.getMBeanServerConnection();
JMSQueueControl queueControl = (JMSQueueControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,
on,
JMSQueueControl.class,
false);
Although I don't know where to fit those parameters I have in my c++ program in order to display the counter.
Thanks in advance.
Hi,
are you saying you want to take advantage of the management functionality from a c++ program.