Synchronizing server-side caches

To synchronize caches, get a JMS provider up and running, configure a Connector for JMS, specifying the implementing Java class, and specify a Topic, Topic Connection Factory, and Strategy.

Before you begin

Procedure

  1. Set up a JMS provider, such as Apache Active MQ, on a machine of your choosing.
  2. In all SDL Knowledge Center Web applications and microservices where caching is enabled, open the Storage Layer configuration file cd_storage_conf.xml in a plain-text or XML editor.
  3. Inside the ObjectCache element, insert a RemoteSynchronization element as the last subelement, and create a Connector subelement inside it.
  4. Give the Connector subelement the following attributes:
    AttributeValue
    Classcom.tridion.cache.JMSCacheChannelConnector
    TopicThe JMS topic to which the Connector is to publish its cache events
    TopicConnectionFactoryThe Factory that creates topic connections to the JMS provider.
    StrategyThe JMS strategy used.
    The value for Strategy, the JMS strategy used, is one of the following:
    Strategy nameDescription
    AsyncJMS10JMS 1.0-compliant asynchronous messaging
    AsyncJMS11JMS 1.1-compliant asynchronous messaging. The attribute defaults to this value if left empty.
    AsyncJMS10MDBJMS 1.0-compliant Message Drive Bean messaging
    AsyncJMS11MDBJMS 1.1-compliant Message Drive Bean messaging
    SyncJMS11JMS 1.1-compliant synchronous messaging

    Note that the Message Driven Bean JMS strategies can only send messages, not receive them. As such, they are not to be used on the Presentation Server (where you should use the asynchronous equivalent instead), but can be used in your Content Deployer Server Role.

  5. Use the JndiContext subelement of the Connector element to set a number of named properties in the form of Property elements.

    The properties typically specify (among others) where to locate the JMS provider, and their names and values depend on the JMS provider used. For example, when using ActiveMQ, you would set the following properties:

    <JndiContext>
    	<Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" />
    	<Property Name="java.naming.provider.url" Value="tcp://providerdb.domain.name:61616?soTimeout=5000" />
    </JndiContext>
  6. Copy resources from your JMS provider as needed to your library location. For example, if you use Apache Active MQ, copy the following files from your Active MQ library folder:
    • activemq-client-5.12.1.jar
    • geronimo-j2ee-management_1.1_spec-1.0.1.jar
    • geronimo-jms_1.1_spec-1.1.1.jar
    • geronimo-jta_1.0.1B_spec-1.0.1.jar
    • hawtbuf-1.11.jar
  7. Save and close cd_storage_conf.xml.
  8. Restart the Web application or microservice.

SDL Community article: Using SDL Tridion Object Caching with Apache Active MQ

You can find out more about using caching with Apache Active MQ in the following SDL Community article: https://community.sdl.com/product-groups/sdl-tridion-dx/tridion-sites/tridion-developer/b/weblog/posts/using-sdl-tridion-object-caching-with-apache-active-mq.