Any one know of a less repetitive way to write to an event outbox using Avro objects for Kafka?
Basically gets repetitive when there is varying event types, with varying sub events. We don't use Entity Framework queries, which to me seems like would be a lot faster coding wise to build these event objects.
We use dapper so most of the time, I'm writing out the queries. But in ways the queries are all very similar except, different tables and columns and joins etc. But they are just searching for data.
Originally I had a logger and a fetcher class that just had all the fetch methods, but having a chance to rewrite I didn't see any benefit in that because all the code that accesses those methods are in different data base access classes. So the fetching class would only ever have a subset of its methods called because UserCRUDMethods may never need to call unrelated FetchCreateApplesEvent.
So I'm keeping the code close to the crud database access classes. Its still feels repetitive. I think maybe SQL generation but I think that would also be a lot too.
0 Replies