Hello all,
we have an NSB endpoint hosted in azure functions using cosmos persistence along with the outbox feature, we use a single container approach which hosts the following documents with the same customerid paritionkey.
- Saga – for the workflow
- business document - for external read and writes.
Now we have a new requirement where we need to trigger a new message to the saga and also update the business document from a blazor server to the endpoint described in #1
- to support the new requirement we now want to introduce Transactional session • NServiceBus.TransactionalSession • Particular Docs.
Questions
-
both the endpoints write to the same business document, so can we have both the endpoints using outbox with the same container??
-
a simple scenario on why we want to implement outbox on the blazor server endpoint, and is there a better approach for the following use case
Upon clicking a button, we want to perform the following actions:
- Write data to the database to capture that user clicked this button
- Submit a message to saga in the function endpoint to fire another process
- Refresh the page.
- After the page refresh, the previously written data will be retrieved, allowing us to disable the button that was clicked so that the user cannot click multiple times.