Journaling and AEM Events

Learn how to retrieve the initial set of AEM Events from the journal and explore the details about each event.

Journaling is a pull method to consume AEM Events, and a journal is an ordered list of events. Using Adobe I/O Events Journaling API, you can fetch the AEM Events from the journal and process them in your application. This approach allows you to manage events based on a specified cadence and efficiently process them in bulk. Refer to the Journaling for in-depth insights, including essential considerations like retention periods, pagination, and more.

Within the Adobe Developer Console project, every event registration is automatically enabled for journaling, enabling seamless integration.

In this example, utilizing an Adobe-provided hosted web application allows you to fetch the first batch of AEM Events from the journal without the need to set up your application. This Adobe-provided web application is hosted on Glitch, a platform known for offering a web-based environment conducive to building and deploying web applications. However, the option to use your own application is also available if preferred.

Prerequisites

To complete this tutorial, you need:

IMPORTANT
AEM as a Cloud Service Eventing is only available to registered users in pre-release mode. To enable AEM eventing on your AEM as a Cloud Service environment, contact AEM-Eventing team.

Access web application

To access the Adobe-provided web application, follow these steps:

Collect Adobe Developer Console Project details

To fetch the AEM Events from the journal, credentials such as IMS Organization ID, Client ID, and Access Token are required. To collect these credentials, follow these steps:

  • In the Adobe Developer Console, navigate to your project and click to open it.

  • Under the Credentials section, click the OAuth Server-to-Server link to open the Credentials details tab.

  • Click the Generate access token button to generate the access token.

    Adobe Developer Console Project Generate Access Token

  • Copy the Generated access token, CLIENT ID, and ORGANIZATION ID. You need them later in this tutorial.

    Adobe Developer Console Project Copy Credentials

  • Every event registration is automatically enabled for journaling. To get the unique journaling API endpoint of your event registration, click the event card that is subscribed to AEM Events. From the Registration Details tab, copy the JOURNALING UNIQUE API ENDPOINT.

    Adobe Developer Console Project Events Card

Load AEM Events journal

To keep things simple, this hosted web application only fetches the first batch of AEM Events from the journal. These are oldest available events in the journal. For more details, see first batch of events.

  • In the Glitch - hosted web application, enter the IMS Organization ID, Client ID, and Access Token you copied earlier from the Adobe Developer Console project and click Submit.

  • Upon success, the table component displays the AEM Events Journal data.

    AEM Events Journal Data

  • To view the complete event payload, double-click the row. You can see that the AEM event details have all the necessary information to process the event in the webhook. For example, the event type (type), event source (source), event id (event_id), event time (time), and event data (data).

    Complete AEM Event Payload

Additional resources

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69