Skip to main content

AEM Event Listener Setup

This guide explains how to install the Dumont AEM event listener bundle inside your AEM as a Cloud Service instance. Once installed, AEM automatically notifies the Dumont connector whenever content is published, modified, or deleted — enabling real-time search index synchronization.


What Gets Installed

The Dumont AEM Server module (aem-server) deploys three artifacts into AEM:

ArtifactTypePurpose
aem-dumont.structureContent packageCreates the /apps/turing repository structure
aem-dumont.configContent packageDeploys the OSGi configuration (host, configName, enabled)
aem-dumont.coreOSGi bundleEvent handlers that listen for page/asset changes and send HTTP requests to Dumont

Prerequisites

  • An AEM as a Cloud Service environment (dev, stage, or prod)
  • A running Dumont connector instance with the AEM plugin (accessible from AEM)
  • Access to your AEM project's Git repository (for Cloud Manager pipeline deployment)
  • Java 11+ and Maven 3.6+ for local builds
AEM as a Cloud Service deployment

AEM as a Cloud Service does not support direct bundle installation via the Felix Console. All code must be deployed through a Cloud Manager pipeline from a Git repository. See Adobe's deployment documentation for details.


Option 1: Add to an Existing AEM Project

If you already have an AEM as a Cloud Service project (created from the AEM Project Archetype), you can integrate the Dumont event listeners into it.

Step 1 — Copy the Source Files

From the Dumont repository, copy these directories into your AEM project:

From: dumont/aem/aem-server/core/src/main/java/com/viglet/turing/aem/server/
├── config/
│ └── DumAemIndexerConfig.java
└── core/
├── events/
│ ├── DumAemPageEventHandler.java
│ ├── DumAemPageReplicationEventHandler.java
│ ├── DumAemResourceEventHandler.java
│ ├── beans/
│ │ ├── DumAemEvent.java
│ │ └── DumAemPayload.java
│ └── utils/
│ └── DumAemEventUtils.java
└── services/
├── DumAemIndexerService.java
└── DumAemIndexerServiceImpl.java

To: your-aem-project/core/src/main/java/com/viglet/turing/aem/server/

Step 2 — Add Dependencies to Your Core Module

Add these dependencies to your project's core/pom.xml:

<!-- Lombok (if not already present) -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
<scope>provided</scope>
</dependency>

<!-- Apache Commons Collections -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.5.0-M3</version>
<scope>provided</scope>
</dependency>

The following dependencies are already provided by AEM SDK and don't need to be added: Jackson, Apache HTTP Client, Sling API, OSGi annotations, AEM Replication API, AEM WCM API.

Step 3 — Add the OSGi Configuration

Create the configuration file for your AEM environment:

your-aem-project/ui.config/src/main/content/jcr_root/apps/<your-project>/osgiconfig/config/
└── com.viglet.turing.aem.server.core.services.TurAemIndexerServiceImpl.cfg.json

Contents:

{
"enabled": true,
"host": "$[env:DUMONT_CONNECTOR_HOST;default=http://localhost:30130]",
"configName": "$[env:DUMONT_CONFIG_NAME;default=WKND]"
}
PropertyDescription
enabledtrue to activate event-driven indexing, false to disable
hostURL of the Dumont connector instance (with AEM plugin)
configNameAEM source name configured in the Dumont connector
Cloud Manager Environment Variables

Use $[env:VAR_NAME;default=value] syntax to configure different values per environment (dev, stage, prod) without changing code. Set the variables in Cloud Manager → Environments → Environment Variables.

See Adobe's environment variables documentation.

Step 4 — Configure the Service User

The replication event handler requires a service user mapping. Add this to your project's ui.config:

your-aem-project/ui.config/src/main/content/jcr_root/apps/<your-project>/osgiconfig/config/
└── org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-dumont-indexer.cfg.json
{
"user.mapping": [
"aem-dumont.core:dumont-indexer=[content-reader-service]"
]
}

Step 5 — Deploy via Cloud Manager

  1. Commit and push your changes to the Git repository
  2. In Cloud Manager, run the deployment pipeline for your target environment
  3. After deployment, verify the bundle is active in AEM → Tools → Operations → Web Console → Bundles (search for "dumont")

Option 2: Create a New AEM Project from Archetype

If you don't have an existing AEM project, create one from the AEM Project Archetype:

mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=49 \
-D appTitle="My Site" \
-D appId="mysite" \
-D groupId="com.mycompany" \
-D aemVersion="cloud"

Then follow Steps 1–5 from Option 1 above.

For the full archetype reference, see Adobe's archetype documentation.


Option 3: Use the Standalone Dumont AEM Server Module

You can also build and deploy the aem-server module directly from the Dumont repository:

git clone https://github.com/openviglet/dumont.git
cd dumont/aem/aem-server
mvn clean install -PautoInstallPackage -Daem.host=localhost -Daem.port=4502
Local SDK only

The -PautoInstallPackage profile installs directly to a local AEM SDK instance. For AEM as a Cloud Service, you must deploy through a Cloud Manager pipeline (Option 1 or 2).


OSGi Configuration Properties

After deployment, the configuration can be managed in AEM → Tools → Operations → Web Console → Configuration (search for "Dumont"):

PropertyDefaultDescription
EnabledfalseToggle event-driven indexing on/off
Hosthttp://localhost:30130Dumont connector URL
Config NameWKNDSource name in the Dumont connector

Cloud Manager Environment Variables

For AEM as a Cloud Service, set these variables in Cloud Manager:

VariableEnvironmentValue
DUMONT_CONNECTOR_HOSTDevhttp://dev-dumont:30130
DUMONT_CONNECTOR_HOSTStagehttp://stage-dumont:30130
DUMONT_CONNECTOR_HOSTProdhttp://prod-dumont:30130
DUMONT_CONFIG_NAMEAllWKND (or your source name)

Verifying the Installation

  1. Check bundle status: AEM → Tools → Operations → Web Console → Bundles → search "dumont" — should be Active
  2. Check configuration: Web Console → Configuration → search "TurAemIndexer" — verify host and configName
  3. Test: Publish a page in AEM and check the Dumont connector logs for incoming requests
  4. Monitor: In Turing ES → Integration → Monitoring, filter by your AEM source to see indexing events

PageDescription
AEM ConnectorHow the connector processes AEM content (infinity.json, tags, model.json)
Extending the AEM ConnectorCustom extensions, configuration JSON, and Maven dependencies
Installation GuideDeploying Dumont connector with the AEM plugin
Turing ES — AEM IntegrationManaging AEM indexing via the Turing ES admin console