Broadleaf Microservices
  • v1.0.0-latest-prod

Tenant and Catalog Synchronization

Table of Contents

Overview

Despite the name of this microservice, the actual Catalog domain is managed from outside Catalog Services. Therefore, when a change is made to the underlying Catalog that contains the Products and Categories this service manages, a CatalogChangedEvent is published, and this service needs to listen for it. This is handled by CatalogServiceCatalogChangeListener. The primary effect of this event is to update the various tracking fields on the related entities in Catalog Services.

Tip
See Tenant Services docs for more information on the Catalog entity and its use.

Catalog Change Listener

The CatalogServiceCatalogChangeListener handles the CatalogChangedEvent for the Catalog Services. It needs to know about all catalog-trackable entities in this microservice in order to keep them in sync with changes made to the owning Catalog, which itself is managed by the Tenant microservice. Once the entities are known, the synchronization work is deferred to the CatalogChangeService, which can handle updating the mutable tracking fields related to Catalogs on the related entities.