ActiveMQ Cache - TcmExtensions/TcmCDService GitHub Wiki

Introduction

ActiveMQ is an opensource messaging server provided by Apache.

ActiveMQ allows interfacing over Java Message Service. Additionally Tridion also supports sending its CacheEvent updates over JMS.

This allows TcmCDService to receive cache update events from Tridion using the ActiveMQ messaging server.

ActiveMQ in .NET is implemented by means of the Apache NMS ActiveMQ library, leveraging the ActiveMQ native protocol.

Details

Tridion by default makes use of a JMS ObjectMessage. This object message contains a serialized com.tridion.cache.CacheEvent object.

The problem is though that .NET does not understand how to deserialize a Java object as it uses a Java specific serialization protocol.

In order to resolve this issue, TcmCDService provides a Java class deriving from the com.tridion.cache.JMSCacheChannelConnector class.

However this implementation serializes a com.tridion.cache.CacheEvent object to XML, which means the serialized data accessible in both Java and .NET.

A XML serialized CacheEvent looks like this:

<cacheEvent key="447:1203471:binaryMeta" regionPath="/com.tridion.storage.ItemMeta" type="1"/>

Tridion will receive the event as follows:

CacheChannel - Received event from another VM 

[CacheEvent 
   eventType=Invalidate 
   regionPath=/com.tridion.storage.ItemMeta 
   key=447:1203471:binaryMeta]