PostOutbox / PostOffice.NET

MIT License
0 stars 0 forks source link

Library use cases #2

Open JakuSw opened 2 weeks ago

JakuSw commented 2 weeks ago

Place to add use cases of app

JakuSw commented 2 weeks ago

As a user (developer) I want to do some action in background

JakuSw commented 2 weeks ago

As a user I want to publish event to bus service to be consumed by other service

PablitoCBR commented 2 weeks ago

As a user I want to be able to persist some data in storage of my choosing and be able to obtain it later on.


We need to provide functionality where the user will be able to pass some data (initially in the form of .NET CLR Type) to API that will persist that data in previously configured storage (for example SQL Server Database or Azure BLOB). Additionally, data persisted must be able to be fetched via API from that storage.

As a user I want to be able to consume persisted data in the order in which it was written


This is essentially the extension of the above need of fetching the persisted data but with requirement that reads have to follow FIFO ordering.

As a user I want to be able to mark persisted data as processed


Since we are implementing the outbox pattern we will be dealing with processed and not yet processed messages. We need to provide an API that will allow us to mark selected messages as processed.

As a user I want to be able to consume only unprocessed messages


We do not want to duplicate our job so when consuming from the outbox we should only consume messages that were not marked as already processed.

As a user I want to be able to consume messages both one by one and in batches


Processing in batches gives us a higher throughput since we load more into memory with a single round-trip to persistence storage. User need that flexibility along with being able to adjust how many messages should be within a batch.