Marking publication of event completed updates more than one row #1008
Labels
in: event publication registry
Event publication registry
meta: waiting for feedback
Waiting for feedback of the original reporter
I am testing out Spring Modulith and have a requirement to push an event to two SQS queues. For now, I'm trying to handle this fan-out by publishing two events like this:
applicationEventPublisher.publishEvent(new SqsOne(payload);
applicationEventPublisher.publishEvent(new SqsTwo(payload);
The definitions of
SqsOne
&SqsTwo
have an@Externalized
on them with their own queue arn, and that works fine. The issue is once one of them completes, the update query updates multiple rows in one go. This is because only serialized_event & listener_id are in the where clause, and they are the same for a given payload as the listener_id is the same for all Externalized Listeners.I realize using SNS for fanout, utilizing a unique field in each wrapper class, or a custom serializer would resolve this, but are there are any plans to incorporate id or and/or event_type into the update where clause so this scenario is handled by default?
I suppose supporting multiple
@Externalized
on a class/record would also handle this scenario quite well as it would provide native fan-out functionality.Thanks for brining this framework to life and continuing to advance it!
The text was updated successfully, but these errors were encountered: