I have a multi-tenant application. The tenants data is isolated based on schema.
I want to implement a transactional outbox pattern, where I want to store the events in a table (in same transaction)and then send events later with a job.
I am planning to keep the events table in each tenant schema, so that it can be updated in the same transaction. I cannot keep the events table in common (application) schema because then I cannot update the table in same transaction...
Now my problem is how will the job (quartz / spring based) know which all schema needs to be checked for events? There can be several tenant schema where there were no events to be processed.