Sometimes we need to PAUSE ActiveMQ e.g. right before the maintenance window starts. In this case the transactions stay in the queue but they are not timing out and the ABIS consumer will not take them from the queue. We can stop ABIS after PAUSING ActiveMQ so we won't loose any transaction at the time of downtime. For this purpose we can use following command (can be written in the script):


curl --user admin:borovicka123 http://127.0.0.1:8161/api/jolokia/exec/org.apache.activemq:brokerName=localhost,destinationName=eafis.applicant,destinationType=Queue,type=Broker/pause

But if the following error occures:

?"error_type":"java.lang.exception","error":"java.lang.exception : origin null is not allowed to call this agent","status":403

one needs to check check:

/opt/innovatrics/external-activemq515/webapps/api/WEB-INF/classes/jolokia-access.xml
and remove the following 3 lines for strict checking part from jolokia-access.xml:

<cors> 
<strict-checking/> 
</cors> 
?

Restart ActiveMQ after editing files:

ABIS 7.X

sudo nomad stop activemq
sudo nomad run /etc/innovatrics/conf.d/activemq.nomad.hcl

or do

nomad job status activemq | grep running | grep activemq| awk '{print $1}' | xargs /usr/sbin/nomad alloc restart $1


ABIS 5.X or 6.X

stop/start abis completely: 

sudo systemctl stop eafis
sudo systemctl start eafis

or you can just kill particular eafis process as you can see on the example below:

don't forget to resume activemq afterwards:

curl --user admin:borovicka123 http://127.0.0.1:8161/api/jolokia/exec/org.apache.activemq:brokerName=localhost,destinationName=eafis.applicant,destinationType=Queue,type=Broker/resume

Relevant ABIS version: 3.x - 7.x