-
1. Re: Wildfly HornetQ control
jbertram Oct 4, 2013 9:36 AM (in response to marcanthony)Are you talking about pausing and resuming a particular queue or the entire broker?
Have you read this?
-
2. Re: Wildfly HornetQ control
marcanthony Oct 4, 2013 9:48 AM (in response to jbertram)That is for a given queue not the entire broker.
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
SimpleString queueId = new SimpleString("org.hornetq:module=JMS,type=Queue,name=my queue");
ObjectName on = ObjectNameBuilder.DEFAULT.getQueueObjectName(queueId, queueId);
JMSQueueControl queueControl =
MBeanServerInvocationHandler.newProxyInstance(mbeanServer, on, JMSQueueControl.class, false)
I am doing this in the right way?
-
3. Re: Wildfly HornetQ control
clebert.suconic Oct 4, 2013 4:57 PM (in response to marcanthony)First things first.. what version of HOrnetQ and Wildfly / JBoss?
-
4. Re: Wildfly HornetQ control
marcanthony Oct 5, 2013 3:26 AM (in response to clebert.suconic)Hi Clebert
Wildfly alpha4, regarding hornetq I am not sure what version is bundled
Thanks
Marc
-
5. Re: Wildfly HornetQ control
marcanthony Oct 7, 2013 4:19 AM (in response to marcanthony)Hi Clebert / Justin
I had not enabled JMX....
is now working.
But the pause method doesn't behave as i would of expected, the consumers continue to process the messages eve after i have invoked pause() on jmsqueuecontrol.
Queue queue = (Queue)new InitialContext().lookup("jms/queue/MyQueue");
ObjectName on = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queue.getQueueName());
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
JMSQueueControl queueControl = MBeanServerInvocationHandler.newProxyInstance(mbsc, on, JMSQueueControl.class, false);
queueControl.pause();
I guess that this could be related to
consumer-window-size.
Considering that the producer and consumers all reside on the server would it be alright to setr the value to 0 to avoid buffering
thanks
Marc