cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Event Mesh Stream Processing support

Andrew_Mai
Participant
0 Likes
739

When using event mesh, I'm having some challenge, to wait for multiple event to finish before go to next step. For example, an order must pass 3 validation event before it can be go to payment step. Each of these validation step will emit an event to notify that the validation has passed. Then we have to wait for these 3 event to pass before go to next step.

https://developer.confluent.io/patterns/stream-processing/logical-and/

Is there a service that support these kind of features like Kafka, or I have to write these feature by myself?

Accepted Solutions (0)

Answers (1)

Answers (1)

Hello Andrew,

CAP does not support this feature out of the box. But there are some steps you have to do in order to implement this feature:

1. In order to guarantee that all validation events are received by the same application instance in the same row as they are sent, you have to configure the queue as exclusive:

cds:
  messaging:
    services:
      - name: "messaging"
        kind: "enterprise-messaging"
        queue:
          config:
            "accessType" : "EXCLUSIVE"

2. In order to guarantee the resilience you have to persist the validation events as the event is acknowledged on the queue and removed when the receiving handler completes. If the application crashes before all validation events are received you will loose the state.

3. If Event Mesh is used in the multi tenant mode (via HTTP) you have either to guarantee that the router routes all events to the same app instance or you have to persist them and periodically check the state.

Regards,

Dietrich