Broadleaf Microservices
  • v1.0.0-latest-prod

Introducing v2 Bulk Operations Support

Basic Architectural Overview

Note
Bulk Operations are currently only supported in Catalog services.
  1. When a request is made to perform a bulk operation, those are now routed through a newly added Bulk Operations orchestration service.

  2. The orchestration service will determine which service should be called to perform the bulk operation, this is currently only supported for Catalog service.

  3. After the bulk operation and its sandbox have been created, a message is sent out to initialize the bulk operation items (each item captures information of the entity instance to update) & the created bulk operation is returned.

  4. The listener in Bulk Operations service receives the message & calls to the appropriate services to start initializing items in batches.

  5. After all the items for the bulk operation have been initialized, a message is sent out to the resource tier service to start processing the items.

  6. The items will be processed by the matching processor & the bulk operation and its items updated to reflect the outcome.

Messaging

Below are the details for the message producers supporting this flow:

CreateSandboxRequestProducer

This producer is responsible for sending a message to creating a sandbox for the new bulk operation. This is so that all the changes for a single bulk operation are stored within a single sandbox & can be promoted, deployed, etc. through the workflow together.

The channel message bindings are registered in the yaml configuration file, see below for example.

spring:
  cloud:
    stream:
      bindings:
        createSandboxRequestOutput:
          destination: createSandboxRequest

BulkOpsInitializeItemsRequestProducer

This producer is responsible for sending a message to initialize all the bulk operation items after a bulk operation has been created.

The channel message bindings are registered in the yaml configuration file, see below for example.

spring:
  cloud:
    stream:
      bindings:
        initializeItemsRequestOutput:
          destination: bulkOperationsInitializeItemsRequest

BulkOpsProcessRequestProducer

This producer is responsible for sending a message to notify the resource tier service that the bulk operation data is completely setup & ready to begin processing. This will trigger the actual processing of a bulk operation & update the associated entities.

The channel message bindings are registered in the yaml configuration file, see below for example.

spring:
  cloud:
    stream:
      bindings:
        processBulkOperationRequestOutput:
          destination: processBulkOperationRequest

UpdateSandboxRequestProducer

This producer is responsible for sending a message to update the sandbox after the bulk operation has been processed. The purpose of this is to update the sandbox containing the changes for the bulk operation to be a temporary sandbox so that it will be automatically removed by the sandbox cleanup cluster service after all the changes have reached a final state.

The channel message bindings are registered in the yaml configuration file, see below for example.

spring:
  cloud:
    stream:
      bindings:
        updateSandboxRequestOutput:
          destination: updateSandboxRequest