How to completely disable Messaging subsystem ?

cancel
Showing results for 
Search instead for 
Did you mean: 
s3rg3d
Partner

How to completely disable Messaging subsystem ?

Jump to solution

Hi,

I have ACS instances dedicated to Solr Indexation.  On theses instances, I disabled transform, events and there are not part of the cluster. I don't want them to connect to MQ either so I set messaging.subsystem.autoStart=false property and remove MQ connection properties.

When I start Tomcat, Messaging subsystem is not started, no connection attempt to MQ is made, it's what I want.

However, everyday after 07:00 am, Messaging subsystem starts and try to connect to MQ indefinitely. I don't understand why the subsystem is started. I can't find any scheduled job starting at this time that starts the subsystem. Is it possible to disable it ? 

 

2023-08-23 07:16:43,629 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [eventAsyncDequeueThreadPool1] Starting 'Messaging' subsystem, ID: [Messaging, default]
2023-08-23 07:16:46,379 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1] Apache Camel 3.18.2 (alfrescoCamelContext) is starting
2023-08-23 07:16:46,643 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1] Routes startup (started:5)
2023-08-23 07:16:46,643 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1]     Started alfresco.default.deadLetter (direct-vm://alfresco.default)
2023-08-23 07:16:46,644 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1]     Started route1 (jms://acs-repo-rendition-events)
2023-08-23 07:16:46,644 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1]     Started alfresco.events -> topic:alfresco.repo.events (direct-vm://alfresco.events)
2023-08-23 07:16:46,644 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1]     Started route2 (jms://acs-repo-transform-request)
2023-08-23 07:16:46,644 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1]     Started queue:org.alfresco.transform.t-reply.acs -> consume (jms://org.alfresco.transform.68c8906a-a55a.t-reply)
2023-08-23 07:16:46,644 INFO  [org.apache.camel.impl.engine.AbstractCamelContext] [eventAsyncDequeueThreadPool1] Apache Camel 3.18.2 (alfrescoCamelContext) started in 1s50ms (build:158ms init:627ms start:265ms)
2023-08-23 07:16:46,649 INFO  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] [eventAsyncDequeueThreadPool1] Startup of 'Messaging' subsystem, ID: [Messaging, default] complete
2023-08-23 07:16:46,871 WARN  [org.apache.activemq.transport.failover.FailoverTransport] [ActiveMQ Task-1] Failed to connect to [nio://localhost:61616] after: 1 attempt(s) with Connection refused, continuing to retry.
 
 
 
 
1 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: How to completely disable Messaging subsystem ?

Jump to solution

If you are using Alfresco 7.4, you can add following setting in Alfresco repository:

repo.event2.enabled=false

Alternatively you can override default Alfresco Repository Spring Beans to avoid running that task:

https://github.com/Alfresco/alfresco-community-repo/blob/2ae93ee6294e55a37facc131f0acd7342e3b8d22/re...

Hyland Developer Evangelist

View solution in original post

3 Replies
angelborroy
Alfresco Employee

Re: How to completely disable Messaging subsystem ?

Jump to solution

If you are using Alfresco 7.4, you can add following setting in Alfresco repository:

repo.event2.enabled=false

Alternatively you can override default Alfresco Repository Spring Beans to avoid running that task:

https://github.com/Alfresco/alfresco-community-repo/blob/2ae93ee6294e55a37facc131f0acd7342e3b8d22/re...

Hyland Developer Evangelist
s3rg3d
Partner

Re: How to completely disable Messaging subsystem ?

Jump to solution

Oh thanks Angel, actually I had already set repo.event2.enabled=false but I'm on ACS 7.3.1 and I didn't see that was only possible since 7.4.

Too bad for me, I guess I have to override beans in Spring configuration for now. About that, do you have some guidance about how to do that ? 

angelborroy
Alfresco Employee

Re: How to completely disable Messaging subsystem ?

Jump to solution

This is the change that provides the feature:

https://github.com/Alfresco/alfresco-community-repo/pull/1703/files

You can try to create your customized org.alfresco.repo.event2.CustomEventGenerator and then to override this Spring Bean:

https://github.com/Alfresco/alfresco-community-repo/blob/a4064fe537a0e7bee5286c825637ae9915178b1e/re...

with something like

<bean id="eventGeneratorV2" class="org.alfresco.repo.event2.CustomEventGenerator" parent="baseEventGeneratorV2"/>
Hyland Developer Evangelist