Cockroach: CDC experimantal_avro message encoding

Created on 6 Dec 2018  ·  3Comments  ·  Source: cockroachdb/cockroach

Describe the problem
When testing the CDC with experimental_avro, I received the following (while for other formats all the messages are readable):
 NAME 11
, ,NAME 22
J JNAME 37
l lNAME 54
€ €NAME 64
„ „NAME 66
¢ ¢NAME 81
¦ ¦NAME 83
Æ ÆNAME 99
à àNAME 112
   NAME 144
Ê ÊNAME 165
î îNAME 183
ü üNAME 190
Š ŠNAME 197
œ œNAME 206
¼ ¼NAME 222
ê êNAME 245
Ž ŽNAME 263
Ü ÜNAME 302
ð ðNAME 312
ú úNAME 317
š šNAME 333
® ®NAME 343
º ºNAME 349
Î ÎNAME 359
Ô ÔNAME 362
è èNAME 372
ˆ ˆNAME 388
” ”NAME 394
¨ ¨NAME 404
 ÂNAME 417
Ö ÖNAME 427
â âNAME 433
ô ôNAME 442
ö öNAME 443
‚ ‚NAME 449
– –NAME 459
´ ´NAME 474
È ÈNAME 484
¬ ¬NAME 534
° °NAME 536
Ð ÐNAME 552
Ô ÔNAME 554
Ø ØNAME 556
ø øNAME 572
Ž Ž NAME 583
” ” NAME 586
˜ ˜ NAME 588
¶ ¶

To Reproduce

What did you do? Describe in your own words.

  • created a changefeed as described in docs.
A-cdc C-question O-community

All 3 comments

@melskyzy thank you for your inquiry.
Avro data can be encoded using either a binary format or a JSON format. https://avro.apache.org/docs/current/spec.html#Data+Serialization

CockroachDB supports the binary format. This what you see.

Is there anything else we can help you with?

@melskyzy specifically, this is the binary Avro format encoded according to the conventions of Confluent's schema registry -- the wire format is described here. You can use the kafka-avro-console-consumer utility that comes with the Confluent platform to decode the binary format.

@melskyzy I peeked at your github profile and it looks like you are a student at UToronto. Friendly advice from a past teacher, to prepare you to work life: when you feel satisfied that your question has been answered, please write a comment that say "thank you, this answers my question" or something similar. Your peers in the industry will greatly thank you for communicating your status in that way.

For now I am closing this issue. If you want to discuss further, please let us know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magaldima picture magaldima  ·  3Comments

nvanbenschoten picture nvanbenschoten  ·  3Comments

HeikoOnnebrink picture HeikoOnnebrink  ·  4Comments

intech picture intech  ·  3Comments

otan picture otan  ·  4Comments