MerrionComputing / EventsSourcing-on-Azure-Functions

A library to demonstrate doing Event Sourcing as a data persistence mechanism for Azure Functions
MIT License
103 stars 20 forks source link

Composable command/query handlers #43

Open MerrionComputing opened 3 years ago

MerrionComputing commented 3 years ago

If command/query steps are written as durable functions that can be triggered by a queue, and events added to the Command or Query backing event stream add messages to the queue to request them it should be possible to create composable command or query handlers.

(This will need some analysis and should be a project)

MerrionComputing commented 3 years ago

Requirements

1) Will need a variant of Notification Handler that sends to a named queue rather than Event Grid.

MerrionComputing commented 3 years ago

(Queue should use the same connection settings as the event stream - I cannot see any value in having the notification queue in a different storage account to the event streams)

MerrionComputing commented 3 years ago

Need to be able to decide between notification providers - I guess including multiple providers...

MerrionComputing commented 3 years ago
  1. Queue notification provider added
  2. Choice of which notification provider to use built in to Command.cs and Query.cs instantiation of underlying event streams

Need to read-back the notification and also add detail to projection requested or classifier requested payloads.

MerrionComputing commented 3 years ago

For a Query there should be a way of running a projection over the query event stream for the Projection Results Returned events so as to perform the collation step...

MerrionComputing commented 1 year ago

Question: should there be separate listeners for the Query Handler and the Command Handler? (From responsibility separation I think yes but there might be a performance implication?)