<-- Back

Resend previously published business events in Mendix Business Events

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:

  1. Deploy the fix for the defect that caused the incomplete data. Otherwise, the resent events contain the same incomplete data.

  2. Identify the objects that were affected during the period, for example by retrieving the objects with a changedDate value within that period.

  3. 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.

  4. Confirm that each consuming app processes repeated events for the same object without creating duplicate records or triggering repeated side effects, such as emails.

  5. Run the microflow in a non-production environment first. Then run it in production with a small batch and monitor the Outbox entity 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

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.