Skip to content

Create "type" field to allow a friendlier event name to be specified #13

@asosMikeGore

Description

@asosMikeGore

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"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions