title: Is it possible to produce Kafka messages containing serialized generic (unknown) C# objects and deserialize them by inferring type in the consumer?
body: <p>EDIT: From the initial comments, it seems I may be barking up the wrong tree. I initially suggested using replication, but according to the networking team that is not possible because the two databases are on different virtual networks. It doesn't seem like this sort of thing would ever be &quot;impossible&quot;, but I don't have the in-depth knowledge required to &quot;fight back&quot;. Is there anything specific I should look into regarding SQL replication over the internet/different virtual networks, or points that I could bring up?</p>
  <p>I've got an application that uses EF to save changes to an MS SQL database. For reasons, I need to be able to capture all changes made through the application and commit those exact DB changes to another, remote MS SQL db, using Kafka as the communication hub. The solution contains a ton of data entities, so ideally I'm looking for a generic way to capture these changes from the application and apply them to the remote DB where appropriate. The consuming application that is reading the messages from Kafka will also be applying the changes via EF (at least for my purposes).</p>
  <p>So, is it possible to do something like this without having to strongly type everything for my hundreds of entities? What are the best practices for doing such a thing? Do I produce messages containing the new entity and the change state (added, updated, deleted)? I'm sure it's a bad idea for some reason, but what about serializing the entire EF ChangeManager and sending that, consolidating all of the Add/Update/Deletes and allowing us to make only a single call vs a bunch?</p>
  <p>If I need to provide any more information please just let me know, I'll be monitoring this thread closely.</p>