ActiveMQ is used in the Alfresco stack to handle event-driven communications between a number of Alfresco services: Repository, Transform, Search Enterprise and Sync. The interaction happens by using asynchronous messaging queues and topics, where the services produce and consume events. This asynchronous processing increases the capacity to scale up Alfresco and also improves the management of time-consuming operations. Messages delivery is guaranteed by using JMS protocol.
Additionally any external asynchronous service can be configured as consumer of Repository messages using the Alfresco Out of Process SDK.
This blog post describes different configurations for using ActiveMQ with Alfresco 7.4.
If you are interested in the installation of ActiveMQ, refer following material:
Sample code and Docker Compose templates are available in https://github.com/aborroy/alfresco-activemq-74
Alfresco Community
Repository produces messages for document creation and update operations using a topic named alfresco.repo.event2
An important limitation is that Alfresco Community doesn't include permissions data in this asynchronous messages (while Alfresco Enterprise does).
This is the reason why the most common scenario for Alfresco Community 7.4 deployments is to disable asynchronous messages production and not to desploy ActiveMQ service.
Add following properties to Alfresco Repository service to disable async messages production:
messaging.subsystem.autoStart=false repo.event2.enabled=false
Docker Compose sample for Alfresco Community is available in https://github.com/aborroy/alfresco-activemq-74/tree/main/docker-community
Alfresco Enterprise
In addition to the Repository service producing messages (in this case with permission data on them), Alfresco Enterprise deployments include a number of services that relies on asynchronous communication:
If any of this services is required, setting up and deploying ActiveMQ is a must.
AIO
When using AIO (All-In-One) service deployments for Transform and Search, following queues and topics are used in ActiveMQ by default.
Service | Type | Name |
---|---|---|
Repository | TOPIC | alfresco.repo.event2 |
QUEUE | acs-repo-transform-request | |
QUEUE | acs-repo-rendition-events | |
Transform | QUEUE | org.alfresco.transform.ad9cab37-5f02.t-reply |
QUEUE | org.alfresco.transform.engine.aio.acs | |
QUEUE | org.alfresco.transform.engine.notUsedByRouter.acs | |
QUEUE | org.alfresco.transform.engine.t-reply.acs | |
QUEUE | org.alfresco.transform.t-request.acs | |
Search | QUEUE | org.alfresco.search.content.event |
QUEUE | org.alfresco.search.contentrefresh.event | |
QUEUE | org.alfresco.search.contentstore.event | |
QUEUE | org.alfresco.search.metadata.event | |
QUEUE | org.alfresco.search.metadata.retry.event | |
QUEUE | org.alfresco.search.path.event | |
Sync | TOPIC | VirtualTopic.alfresco.repo.events.nodes |
Sample Docker Compose deployment for this configuration is available in https://github.com/aborroy/alfresco-activemq-74/tree/main/docker-aio
Individual
When using Individual service deployments for Transform and Search, following queues and topics are used in ActiveMQ by default.
Service | Type | Name |
---|---|---|
Repository | TOPIC | alfresco.repo.event2 |
QUEUE | acs-repo-transform-request | |
QUEUE | acs-repo-rendition-events | |
Transform | QUEUE | org.alfresco.transform.ad9cab37-5f02.t-reply |
QUEUE | org.alfresco.transform.engine.imagemagick.acs | |
QUEUE | org.alfresco.transform.engine.libreoffice.acs | |
QUEUE | org.alfresco.transform.engine.tika.acs | |
QUEUE | org.alfresco.transform.engine.alfresco-pdf-renderer.acs | |
QUEUE | org.alfresco.transform.engine.misc.acs | |
QUEUE | org.alfresco.transform.engine.notUsedByRouter.acs | |
QUEUE | org.alfresco.transform.engine.t-reply.acs | |
QUEUE | org.alfresco.transform.t-request.acs | |
Search | QUEUE | org.alfresco.search.content.event |
QUEUE | org.alfresco.search.contentrefresh.event | |
QUEUE | org.alfresco.search.contentstore.event | |
QUEUE | org.alfresco.search.metadata.event | |
QUEUE | org.alfresco.search.metadata.retry.event | |
QUEUE | org.alfresco.search.path.event | |
Sync | TOPIC | VirtualTopic.alfresco.repo.events.nodes |
Sample Docker Compose deployment for this configuration is available in https://github.com/aborroy/alfresco-activemq-74/tree/main/docker-split
ActiveMQ Web Console
Once a Docker Compose deployment is up & ready, ActiveMQ Web Console is available by default in http://localhost:8161 with default credentials admin/admin
Using Docker Volumes
Docker Compose templates provided in this article are not using local storage with Docker Volumes. Enabling this feature can be done using a configuration like the following one.
activemq: image: alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8 mem_limit: 1g ports: - 8161:8161 volumes: - ./data/activemq-data:/opt/activemq/data
ActiveMQ data folder includes both data and log information.
Service Dependencies
Following table shows dependent services that require to be deployed when using a given service.
[1] events2: https://github.com/Alfresco/alfresco-community-repo/blob/23.1.0.181/repository/src/main/resources/al...
[2] events: https://github.com/Alfresco/alfresco-community-repo/blob/23.1.0.181/repository/src/main/resources/al...
Monitoring
ActiveMQ can be monitored using different tools. Reference project includes a sample for some of then in https://github.com/aborroy/alfresco-activemq-74/tree/main/docker-aio-monitoring
You can find additional usage details in the GitHub project. Remember that this material should be only used as reference, you may need to adapt or to enrich this base depending on your requirements.
Maintenance
Following points require periodic maintenance:
Advisory Messages may be disabled, but this feature is adding small overhead in terms of memory and connection resources. Even with that, in some cases it can make sense to disable all advisories.
Video Recording
Additional details are available in the following video.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.