Class ArtemisJolokiaAdapter

java.lang.Object
com.kingsrook.qqq.esb.management.ArtemisJolokiaAdapter
All Implemented Interfaces:
EsbBrokerAdapter

public class ArtemisJolokiaAdapter extends Object implements EsbBrokerAdapter
Broker adapter for ActiveMQ Artemis: runs the queue's QueueControl MBean operations through the web console's Jolokia API (POSTs under /console/jolokia/ on the provider's managementUrl - e.g., http://host:8161). Artemis supports every action. Each call first searches for the queue's MBean by queue name (so it needn't know the broker name, address, or routing type - a subscription queue's address is its topic), then reads or execs on it. A queue name may also be fully qualified, ADDRESS::QUEUE (as EsbBrokerNames names subscription queues); then the search matches the address too. Messages are selected by Artemis core filters: by JMS message id (AMQUserID), or by JMS timestamp (AMQTimestamp). Ids are quoted literals in the filter, so no id can widen it; and with no ids, nothing is sent - an empty filter would select every message. Requests carry the managementUrl's origin as their Origin header, as the console's own browser requests do: Artemis's default Jolokia access policy rejects requests whose Origin isn't allowed (see jolokia-access.xml). The managementUsername needs a role the console lets manage queues.