JMXPersister

JMXPersister is a JMS message consumer that retrieves the JMX request from the message and sends it to a JMX server for a query or an action. Once the query result is returned, it will put the result into the message body and removes the message from the internal XQueue. JMXPersister supports generic JMX implentations. It also supports non-standard implementations, such as WMQ PCF and QPid QMF. Currently only one operation, display, is supported. It also supports flow control and XA. Fault tolerance with auto reconnections is built in.

For JMX statement, it is similar to PCF statement. For example, to list all queues with the patten of mbean_pattern for IMQ: DISPLAY QUEUE(mbean_pattern) TYPE(IMQ)

Apart from the common properties, there are many implementation specific properties for JMXPersister.
Property Name Data Type Requirement Description Examples
JMXField string optional field name for JMX query statement (default: JMX)
RCField string optional field name to store return code (0 for success) (default: ReturnCode)
ResultField string optional field name to store the number of rows returned (default: SQLResult)
ResultType integer mandatory type of the result 8 for JSON (default: 1)
Template string optional template to build the JMX statement
where most of the implementation specific properties are for presentations.

Beside of generic JMX implementations, there is also a dedicate implementation for IBM WebSphere MQ via PCF command. For IBM WebSphere MQ, here are the vendor-specific properties for JMXPersister.
Property Name Data Type Requirement Description Examples
PCFField string optional field name for PCF query statement (default: PCF)
ChannelName string optional name of the WMQ SVRCONN channel TEST (default: SYSTEM.DEF.SVRCONN)
SecurityExit string optional classname of the securit exit org.qbroker.wmq.SimpleSecurityExit
SecurityData string optional argument passed into the securit exit
where SecurityExit specifies the full classname for WMQ authentications.

For QPid QMF, here are the vendor-specific properties for JMXPersister.
Property Name Data Type Requirement Description Examples
QMFField string optional field name for QMF query statement (default: QMF)

Here is an example of JMXPersister for JMX:

{
  "Name": "pstr_jmx",
  "ClassName": "org.qbroker.persister.JMXPersister",
  "URI": "service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi",
  "Operation": "display",
  "LinkName": "AMQ",
  "Username": "admin",
  "Password": "admin",
  "JMXField": "JMX",
  "ResultType": "8",
  "MaxNumberMessage": "500",
  "MaxIdleTime": "600",
  "DisplayMask": "22"
}

Here is an example of JMXPersister for PCF:

{
  "Name": "pstr_pcf",
  "ClassName": "org.qbroker.persister.JMXPersister",
  "URI": "pcf://panda1",
  "Operation": "display",
  "LinkName": "PCF",
  "PCFField": "PCF",
  "ResultType": "8",
  "MaxNumberMessage": "500",
  "MaxIdleTime": "600",
  "DisplayMask": "22"
}

Here is an example of JMXPersister for QMF:

{
  "Name": "pstr_qmf",
  "ClassName": "org.qbroker.persister.JMXPersister",
  "URI": "amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'&cf=local",
  "Operation": "display",
  "LinkName": "QMF",
  "QMFField": "JMX",
  "ResultType": "8",
  "MaxNumberMessage": "500",
  "MaxIdleTime": "600",
  "DisplayMask": "22"
}