forked from mikegore1000/SimpleEventStore
-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
Description
At present we have no way to associate a friendly event type name with an event. If Cosmos DB ever enhance the change feed to support filtering or someone wants to do this on the client (could work around this by checking the type of event body), it wouldn't be possible to do this with the current schema. The bodyType would not be a good way to do this, especially if multiple versions are involved:
{
"id": "8939ed97-a757-46e9-846f-267015bfae79:1",
"eventId": "780676c1-c8fa-4610-94b4-bd9be7628a23",
"body": {
"OrderId": "TEST-ORDER"
},
"bodyType": "NetCoreReferenceTest.OrderPlaced, NetCoreReferenceTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"metadata": null,
"metadataType": null,
"streamId": "8939ed97-a757-46e9-846f-267015bfae79",
"eventNumber": 1,
"_rid": "dyFDAPhAqAEBAAAAAAAAAA==",
"_self": "dbs/dyFDAA==/colls/dyFDAPhAqAE=/docs/dyFDAPhAqAEBAAAAAAAAAA==/",
"_etag": "\"00007c01-0000-0000-0000-595337780000\"",
"_attachments": "attachments/",
"_ts": 1498625912
}
Ideally, we'd just have something like this added:
{
"type": "OrderPlaced"
}