Issue
A Mendix app published business events that contained incomplete data, and the consuming apps received that incomplete data. Resending all business events published during a past period, for example, the last two weeks, is required so that the consuming apps receive complete data.
Environment
Mendix Business Events (all versions)
Cause
The Publish Business Event activity stores each event in the Outbox entity of the publishing app, delivers it to the Mendix Event Broker, and deletes it from the Outbox entity after successful delivery. After delivery, the publishing app does not keep the event in a form that can be sent again. A resend therefore requires the publishing app to publish the events again.
Solution / Workaround
No built-in function resends delivered business events. As a workaround, publish the events again from the data of the publishing app by following these steps:
Deploy the fix for the defect that caused the incomplete data. Otherwise, the resent events contain the same incomplete data.
Identify the objects that were affected during the period, for example by retrieving the objects with a
changedDatevalue within that period.Create a microflow that retrieves the affected objects in batches. For each object, the microflow creates the business event and calls the Publish Business Event activity, using the same logic as the original publishing microflow.
Confirm that each consuming app processes repeated events for the same object without creating duplicate records or triggering repeated side effects, such as emails.
Run the microflow in a non-production environment first. Then run it in production with a small batch and monitor the
Outboxentity to confirm that the events are delivered.
The resent events contain the current state of the data, not the state at the time of the original event.
As an alternative to resending events, consuming apps can retrieve the complete data directly from the publishing app, for example through a published OData or REST service.
Internal information related
- 293391
Additional information
- Mendix documentation:
0 Comments