The plugin lifecycle is triggered when a source emits content.

Each Mosaic source has its own worker thread and plugin lifecycle events that start with a $ will execute inside the worker thread. All other lifecycle events will execute in the main Mosaic process.

The 5 lifecycle events are:

  1. $afterSource
  2. $beforeSend
  3. afterUpdate
  4. shouldClearCache
  5. shouldUpdateNamespaceSources
Caution

Plugin methods that trigger inside the main thread should be asynchronous and highly optimised to avoid holding up the main thread.

Mosaic BETA

Coming soon