Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
Deserializing a key of type number in KafkaJS

I'm trying to decode a topic key of a type number with KafkaJS.
The key object arrives as a Buffer, but I'm struggling with finding a way to decode it's value.
Example:

// message.key equals to Buffer.from([0x49, 0x57, 0x48, 0x55, 0x52, 057, 0x52])

const decodedKey = decodeBuffer(message.key);
// Should be equal to 1907494

I assume that it's a product of Java serialization. 'How can I deserialize it in JavaScript?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Check Buffer docs for different ways to read numbers.

Ex.

var b = Buffer.from([0x49, 0x57, 0x48, 0x55, 0x52, 057, 0x52]);
console.log(b.readInt32LE()) // 1430804297
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!