Skip to content

Commit

Permalink
backend: send payload for binary serde
Browse files Browse the repository at this point in the history
  • Loading branch information
weeco committed Nov 28, 2023
1 parent ffa22d7 commit 91b1523
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/pkg/serde/binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ func (BinarySerde) Name() PayloadEncoding {
}

// DeserializePayload deserializes the kafka record to our internal record payload representation.
func (BinarySerde) DeserializePayload(_ context.Context, _ *kgo.Record, _ PayloadType) (*RecordPayload, error) {
func (BinarySerde) DeserializePayload(_ context.Context, record *kgo.Record, payloadType PayloadType) (*RecordPayload, error) {
payload := payloadFromRecord(record, payloadType)

return &RecordPayload{
Encoding: PayloadEncodingBinary,
DeserializedPayload: payload,
NormalizedPayload: payload, // The frontend will render these bytes
Encoding: PayloadEncodingBinary,
}, nil
}

Expand Down

0 comments on commit 91b1523

Please sign in to comment.