Using Ingress Message Plug-Ins
By default, the SolCache service facility caches all live data messages that it receives on a topic, subject to its configured constraints. However, the Ingress Message Plug-In can be used so that live data messages received for a topic can be inspected and then processed according to criteria defined in a shared library before a SolCache Instance caches or discards them. This allows only those messages that meet specific customer-defined criteria to be cached.
When an Ingress Message Plug-In is enabled, SolCache passes a special‑purpose data structure (
solCache_pluginEventInfo_t) to the Plug-In function (
solCache_plugin) used by the dynamically shared library. The
solCache_plugin function can examine the contents of an ingress live data message, optionally modify or replace the message (using the standard Solace C API message parsing/processing functions), and then return an operation code (
solCache_opcode_t) to the SolCache Instance that instructs it to do one of the following actions:
- cache the message
- flush the cache contents for the topic, then cache the message
- flush the cache contents for the topic, then discard the message
- discard the message
- discard the message, and then act as if a message loss was detected
The following example shows how the Plug-In can process ingress live data messages.
Ingress Plug-In Operation
Note: Cache flush operations affect in-progress cache requests. A cache request may retrieve pre- and post-flush data if the flush occurs while a SolCache Instance is sending the response to a request.