To configure a custom hornetq interceptor, it requires the interceptors be a dependency of the org.jboss.as.messaging module. When a cumulative patch or one off patch is applied updating the module, it will revert the changes and require modification of the .overlays ... module.xml.
We should add a dependency in org.jboss.as.messaging module to depend on an optional dependency such as org.hornetq.interceptors. The user could then create $JBOSS_HOME/modules/org/hornetq/interceptors/module.xml
<module xmlns="urn:jboss:module:1.1" name="org.jboss.as.messaging">
...
<dependencies>
...
<module name="org.hornetq.interceptors" optional="true"/>
...
The $JBOSS_HOME/modules/org/hornetq/interceptors/module.xml would look something like this:
<module xmlns="urn:jboss:module:1.1" name="org.hornetq.interceptors">
<resources>
<resource-root path="custom-hornetq-interceptor.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.jms.api"/>
<module name="javax.transaction.api"/>
<module name="org.hornetq"/>
</dependencies>
</module>