Broadleaf Microservices
  • v1.0.0-latest-prod

Menu Service Configuration

Overview

The following properties can be configured to control various aspects of the Broadleaf Menu Service

Property Description

broadleaf.menu.jpa.*

JPA Configuration Properties. See com.broadleafcommerce.common.jpa.data.JpaProperties for full list of options.

broadleaf.menu.datasource.*

Datasource Configuration Properties. See org.springframework.boot.autoconfigure.jdbc.DataSourceProperties for full list of options.

broadleaf.menu.liquibase.*

Liquibase Configuration Properties. See org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties for full list of options.

broadleaf.menu.delegating.*

Delegating Schema Configuration Properties for running in a composed mode along side other Broadleaf microservices. See com.broadleafcommerce.common.jpa.data.SchemaDelegatingProperties for full list of options.

broadleaf.menu.cache.byMenuTtl

TTL property that influences cache settings for the menu service in Minutes (Defaults to 5 minutes)

Menu Cache Invalidation (since 2.0.3)

To enable the cache invalidation message flow, there are two options available. The cache invalidation properties are not pre-configured in order to preserve backwards compatibility.

  1. Set broadleaf.menu.cache.invalidation.active=true through configuration properties to enable the invalidation flow.

    • Additionally, you will need to set up the following message binding properties in the same locations as the active property: spring.cloud.stream.bindings.menuCacheInvalidationOutput.destination=menuCacheInvalidation spring.cloud.stream.bindings.menuCacheInvalidationInput.destination=menuCacheInvalidation

  2. Set the JVM property -Dbroadleaf.menu.cache.invalidation.active=true to enable the invalidation flow.

    • Setting the property through JVM will automatically leverage MenuCachePropertiesEnvironmentPostProcessor to register the spring message bindings for cache invalidation.

Note
The broadleaf.menu.cache.invalidation.active property (and supporting message binding properties) must be activated on every flex package containing this microservice. e.g. A balanced deployment should contain broadleaf.menu.cache.invalidation.active=true for both the Browse and Processing flex packages.

When updating an entity, a message is sent to invalidate the entity cache for discrete cache invalidation. Cache invalidation for each entity can be invalidated partially or can require a full eviction of the entity cache depending on the reset property specified on the event message. Cache invalidation can also be influenced by the ability to delay cache event messages for a time, as defined by the message send delay properties.

Table 1. Properties that influence cache invalidation message settings for the menu service.
Name Description Default

broadleaf.menu.cache.invalidation.active

Whether or not to enable the cache invalidation messaging flow in menu services.

false

broadleaf.menu.cache.invalidation.*

See com.broadleafcommerce.common.messaging.notification.NotificationProperties for the full list of options.4

broadleaf.menu.cache.invalidation.retry.*

See com.broadleafcommerce.common.messaging.notification.RetryProperties for the full list of options.