How to inspect all events using the Async Daemon? #2044
Replies: 2 comments
-
Hi, you have to pass concrete events types - the same that you register in your For example, here's my configuration code section related to events, you can have similarly in your async projection.
|
Beta Was this translation helpful? Give feedback.
-
Additionally, as far as I remember, when you update |
Beta Was this translation helpful? Give feedback.
-
I'm trying to implement a custom async projection that will allow me to inspect every event that's saved to Marten.
So I created events like the following, with each event implementing a common interface:
This is my projection:
If I add this projection to my publishing app using
.Events.InlineProjections.Add
, the projection works as expected. I can see every event.If I add this to my Async Daemon app using
.Events.AsyncProjections.Add
, the projection does not process the events.However, if I change the projection to consume a concrete type:
public Type[] Consumes => new Type[] { typeof(CustomerCreated) };
Then the projection works, but I only see
CustomerCreated
events, which is not what I want - I want to see all of them.Why does the async daemon consume concrete types, but not those derived from an interface?
Or is there a different way to do this?
Beta Was this translation helpful? Give feedback.
All reactions