The magic byte is used to allow format changes in a backwards compatible way. Kafka 0.6 used magic byte 0, we changed that to 1 in Kafka 0.7 as compression required adding new fields to Message. Value is 2 currently (kafka 0.8) since we changed the format of Message to implement replication.
On Sat, Oct 19, 2013 at 12:09 AM, Heaton Chen < heaton.c...@hughestelematics.com> wrote: > Dear team,**** > > ** ** > > I am looking at the source code at Branch 0.8. I have a confusion in > Message.scala file.**** > > ** ** > > the CurrentMagicValue was set 0 initially, but in class comments I saw “1 > byte "magic" identifier to allow format changes, value is 2 currently”? > what does it mean? **** > > ** ** > > ** ** > > Regards**** > > Heaton Chen**** > > Web Administrator**** > > ** ** > > [image: 1314_HTIChinaLimitedLogo_2_13_color]**** > > HTI (China) Limited**** > > 15/F, Building D, NOVA Center, No.5 Dongfeng Third road, Wuhan Economic & > Technological Development Zone, Hubei, China**** > > Zip: 430056**** > > Cell: 86 13437167669**** > > *heaton.c...@hughestelematics.com <wenjian....@hughestelematics.com>*** > > ** ** >