From 737623f5322be19fe21d22fb57bb11b29af4fea9 Mon Sep 17 00:00:00 2001 From: Robin Tang Date: Fri, 20 Dec 2024 14:33:07 -0800 Subject: [PATCH] Clean up. --- lib/mongo/message.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/mongo/message.go b/lib/mongo/message.go index a66dba30..bb1ebff3 100644 --- a/lib/mongo/message.go +++ b/lib/mongo/message.go @@ -36,13 +36,8 @@ func (m *Message) ToRawMessage(collection config.Collection, database string) (l Operation: m.operation, }, } - - pkMap := map[string]any{ - "payload": m.pkMap, - } - // MongoDB wouldn't include the schema. - return lib.NewRawMessage(collection.TopicSuffix(database), debezium.FieldsObject{}, pkMap, evt), nil + return lib.NewRawMessage(collection.TopicSuffix(database), debezium.FieldsObject{}, m.pkMap, evt), nil } func ParseMessage(after bson.M, before *bson.M, op string) (*Message, error) {