Developers can initiate batch syndication jobs by sending a batch event message to the
ep.batch.catalogsyndication queue using Java Messaging Service (JMS).
Create Batch Syndication JMS Message
When the catalog syndication batch job in the Elastic Path batch server gets an event message from the
ep.batch.catalogsyndication queue, the batch projection builder starts the corresponding batch jobs. For Elastic Path batch server to initiate the batch jobs, developers must create a message and send it to the
ep.batch.catalogsyndication queue in JMS in the following format:
Ensure that the
cleanUpDatabase flag is set to
true to clean the entire database before building the batch projection. If the flag is set to
false, only projections for entities that have changed are cleaned. Cleaning up the database ensures that data from the previous build projection is removed.
The batch projection builder builds each projection in the following sequence:
The batch server uses SQL scripts to create infrastructure database tables. Ensure that your profile contains the following configuration property to use batch server on an Oracle database:
- Runs the
cleanUpDatabasejob. This step is optional
- Fetches all entities of the corresponding job type, such as brand, SKU option, or product
- Builds multiple projections from the single domain entity
- Writes the projections to the database
The batch projection builder can build all entity projections together or as separate entities. The entities are built in the following order if built all together:
You can set a disable date and time on products, SKUs and categories in the catalog. These values are syndicated to the
TCATALOGPROJECTIONS database table. When you run a batch job, the job checks the
TCATALOGPROJECTIONS table. It deletes the product from the catalog if the
DISABLE_DATE_TIME is set to the current date and time or is in the past. The job schedules its next run to be on the closest
DISABLE_DATE_TIME or within an hour, whichever comes first.