Monitoring Events
Monitoring events provide all the details necessary to trace items throughout the Data Hub item lifecycle. Enable the events explicitly in your Data Hub configuration to make them available to the Event Publisher.
Data Hub produces the following monitoring events:
- BatchesReceivedEvent - indicates that Data Hub successfully completed a loading action. It only fires a BatchesReceivedEvent when all items included in the data loading action are persisted. With this event, you can be certain that all data included in a single data loading action is complete before composition. The event contains the batch and trace IDs of all items, allowing you to trace loaded items at a batch level, such as an IDoc.
- CanonicalItemEvent - indicates that a new canonical item was created. It includes the canonical item UUID, document ID, batch ID, and trace ID.
- ArchivedCanonicalItemEvent - indicates that an existing canonical item was archived. Data Hub also fires the event when more than one raw item from different batches is composed into a single canonical item. It's true even if no intermediate canonical item is persisted. The event includes all canonical item details.
- CanonicalItemPublicationStatusEvent - indicates a publication attempt for a canonical item. This event includes the resulting canonical item publication status, along with all canonical item details.
- NoMorePublicationAttemptsEvent - indicates that a publication of a canonical item did not succeed and is no longer attempted. The situation occurs when the maximum number of attempts to publish to a target system is reached without success, or the item is continually ignored during publication. This event is always enabled.
All monitoring events, except for the NoMorePublicationAttemptsEvent, are disabled by default. If you enable the Event Publisher, but do not enable the required events, Data Hub produces a validation error on start-up. To enable events, add the following properties to your local.properties file, setting the values to true for all required events:
| Property Name | Possible Values | Default | Description |
|---|---|---|---|
| datahub.event.batches.received.enabled | boolean | false | Enables or disables the BatchesReceivedEvent |
| datahub.event.canonicalitem.enabled | boolean | false | Enables or disables the CanonicalItemEvent and ArchivedCanonicalItemEvent |
| datahub.event.itempublication.enabled | boolean | false | Enables or disables the CanonicalItemPublicationStatusEvent |
| datahub.event.data-attributes.enabled | boolean | false | Enables or disables the inclusion of item attributes in the event DTO |