adobe / aio-lib-java

Adobe I/O - Java SDK
https://opensource.adobe.com/aio-lib-java/
Apache License 2.0
6 stars 19 forks source link

`aem` add a Provider Osgi configuration to allow aem developper to choose the delivery format #102

Closed francoisledroff closed 2 years ago

francoisledroff commented 2 years ago

With this change, the default AEM AIO Event Delivery Format will change from the legacy adobe_io to cloud_events_v1 as we recommend using CloudEvents.

The CloudEvents event envelope looks like this :

{
  "datacontenttype": "application/json",
  "specversion": "1.0",
  "source": "urn:uuid:'"${provider_id}"'",
  "type": "'"${event_code}"'",
  "id": "'"${your_event_id}"'",
  "data": "your event json payload"
}'

when the legacy adobe_io envelope looks like :

{
  "event_id": "'"${your_event_id}"'",
  "event": "your event json payload"
}' 

Breaking change This can be considered as a breaking change as upgrading existing AEM deployment with the resulting package may break former integration. However this can be easily overridden by the AEM admin/dev by updating the Adobe I/O Events' Provider Configuration Osgi configuration and setting event.delivery.format to adobe_io.

In AEMaaCS you will need to add the a com.adobe.aio.aem.event.management.internal.EventProviderConfigSupplierImpl.cfg.json osgi config file in your CloudManager git repo with the following setting:

{
  "event.delivery.format": "adobe_io"
}
francoisledroff commented 2 years ago

released with version 0.1.0