I am creating three different event types for Kafka or any queue for an insert, update or delete to a table in SQL server. I am thinking of how the message should be structured. What is the best way to structure these messages in Kafka or any streaming queue like azure event hubs, rabbitmq?
Message Value for Update
{
"tableName": "string",
"tableKey": [
{
"key": "string",
"value": "string"
}
],
"columns": [
{
"columnName": "string",
"columnValue": "string"
},
{
"columnName": "string",
"columnValue": "string"
}
]
}
Message Value for Delete
{
"tableName":"string",
"tableKey": [
{
"key": "string",
"value": "string"
}
]
}
Message Value for Insert
{
"tableName":"string",
"tableKey": [
{
"key": "string",
"value": "string"
}
],
"Not sure what should be there because there can be 100 columns in a table"
}