The Sakai MessageService integrates JMS with Sakai and exposes the JMS API as a service. ActiveMQ is used as the JMS implementation.
Moire info about this related to events here: JMS Event Service
- 2008-02-13 : Switch to full spring configuration.
- org.sakaiproject.messageservice.JmsConnectionFactory accessible via Spring declaration.
- Retained org.sakaiproject.messageservice.api.MessageService for direct JMS implementation.
- Changed ActiveMQ to version 5.1 to fix 'hanging' broker and client during shutdown problem.
- 2008-02-04 : Applied some Bugfixes to the messageservice based cluster service. This should be ready for initial testing now
- 2008-01-29 : Extended MessageService API to allow to create a connection with username and password
- 2008-01-26 :
- Extended MessageService API by adding "public Connection getConnection()"
- Created MessageService sakai_2-4-x branch, which uses ActiveMQ v4.1.1
- 2008-01-23 :
- Finished first round of converting Sakai Cluster Service to use the Message Service. Performed initial testing in a two node setup.
- Requested Sakai Foundation JIRA Branch for Sakai Cluster Service using Message Service: http://bugs.sakaiproject.org/jira/browse/SAK-12797
Documentation JMS v1.1
- Make sure that you look at the v1.1 and NOT v1.0.2 of the JMS API
The MessageService API is very simple and exposes the following methods:
Usage with Spring (Sakai 2.5)
MessageService (JMS) Best Practices
- JMS Connection Object
- Usually there is no need to create more than one JMS Connection object, and the ActiveMQ documentation and AQM Forum posts recommend to create/use only one connection object per server. Thus, in Sakai, we should use only one connection by calling getConnection(). In rare cases, it's justified to create a second connection.
- JMS Session
- I asked about JMS session usage in the ActiveMQ forum, and here is the thread:
- changing the persistence adapter
The persistence adapter can be changed in sakai.properties or local.properties.
possible persistence adapters:
- enable clustered broker
By default the broker is configured to run in standalone mode. To enable a clustered environment and auto discovery the following change have to be applied to activemq-beans.xml
- changing other Broker properties
other valid bean name, that defines a url string
- On each application node, you need to enable the following ports and protocols in your host based firewall
- TCP port 61616
- UDP port 6155
- e.g. Linux iptables
Building The MessageService sakai_2-4-x Branch (Maven 1)
- svn co https://source.sakaiproject.org/contrib/messageservice/branches/sakai_2-4-x messageservice-2-4-x
- cd messageservice-sakai_2-4-x
- maven sakai