ActiveMQ

From Wikitech
Jump to: navigation, search

Were adding ActiveMQ as part of our 2009 Fundraiser architecture. It will stand between civicrm and our operational cluster running the Donation Gateway extension providing a new payment gateway.

It's currently living on erzurumi within our private pmtpa.wmnet network.

Contents

Software

Currently were running ActiveMQ 5.4.1 for our installation. The software needs to be pupitized but in the interm is located in /usr/local/apache-activemq sym linked to the current version. The configuration is located in /etc/activemq.conf.

Configuration

Config files

There are two important config files for ActiveMQ:

  • /usr/local/apache-activemq/conf/actibemq.xml - This contains the specific conncetion information for activemq (eg defining transportConncetors). This gets loaded by activemq by default when activemq is invoked.
  • /etc/activemq.conf - This contains some environment variables for activemq

Connectors

<transportConnector name="stomp" uri="stomp://0.0.0.0:61613?transport.closeAsync=false"/>

Start/Stop

/etc/init.d/activemq {start|stop}

note: if stop doesn't work then just killall java

Escalation

Arthur

Activity

Check /var/log/activemq.log for what's going on.

or to view in a web browser:

Log into any wikimedia cluster machine. ex

ssh tfinc@fenari.wikimedia.org -L 4000:erzurumi.pmtpa.wmnet:8161

Login with your default terminal username

ssh fenari.wikimedia.org -L 4000:erzurumi.pmtpa.wmnet:8161

ssh grosley.wikimedia.org -L 4000:erzurumi.pmtpa.wmnet:8161

Connect to ActiveMQ

http://localhost:4000/admin/queues.jsp

Testing donation consumption

  1. Follow the steps above to pull up the web interface.
  2. Under the "Operations" column click "Send to" for the "test_donations" queue.
  3. Insert a test message and click send. (The message body will consist of a JSON string. You can check the logs to see examples.)
  4. ssh to aluminium (or wherever civicrm-dev is running from).
  5. cd to the /srv/org.wikimedia.civicrm-dev directory
  6. run "drush qc" to consume the queue
  7. If there are no errors, log into https://civicrm-dev.wikimedia.org/civicrm/ and look for the donation.

Monitoring

Nagios is setup to check both the stomp protocol and ssh.

Personal tools
Namespaces

Variants
Actions
Navigation
Ops documentation
Wiki
Toolbox