Issue originally raised in Commanded by @drozzy (#81).
Need to investigate whether it is possible to persist event data & metadata as JSON when using a JSON event serializer.
Example
Persisted events from Event Store:
{
"correlationId": "ccf88746-06ba-459f-b93a-9ccce1cebdf1",
"readerPosition": {
"$s": {
"$ce-account": 6
}
},
"events": [
{
"eventStreamId": "account-333-121-568-3245",
"eventType": "Elixir.Bank.Events.AccountOpened",
"data": "{\"timestamp_utc\":1506096118,\"initial_balance\":0,\"client_id\":\"3324-john.oliver\",\"account_id\":\"333-121-568-3245\"}",
"metadata": "{\"$correlationId\":\"7e083e9e-bcf6-4cc5-8cc8-47d84f14ec50\"}",
"readerPosition": {
"$s": {
"$ce-account": 0
}
}
},
]
}
Possible solution
Set the data_content_type and metadata_content_type to 1 for Extreme's ExMsg.NewEvent message (source).
Issue originally raised in Commanded by @drozzy (#81).
Need to investigate whether it is possible to persist event data & metadata as JSON when using a JSON event serializer.
Example
Persisted events from Event Store:
{ "correlationId": "ccf88746-06ba-459f-b93a-9ccce1cebdf1", "readerPosition": { "$s": { "$ce-account": 6 } }, "events": [ { "eventStreamId": "account-333-121-568-3245", "eventType": "Elixir.Bank.Events.AccountOpened", "data": "{\"timestamp_utc\":1506096118,\"initial_balance\":0,\"client_id\":\"3324-john.oliver\",\"account_id\":\"333-121-568-3245\"}", "metadata": "{\"$correlationId\":\"7e083e9e-bcf6-4cc5-8cc8-47d84f14ec50\"}", "readerPosition": { "$s": { "$ce-account": 0 } } }, ] }Possible solution
Set the
data_content_typeandmetadata_content_typeto1for Extreme'sExMsg.NewEventmessage (source).