简体   繁体   English

AWS Node JS kafka 消费者解密kafka消息的代码示例

[英]Code example for AWS Node JS kafka consumer to decrypt the kafka message

Kafka producers producing the records and I wanted to consume those records in node JS lambda. Kafka 生产者生成记录,我想在节点 JS lambda 中使用这些记录。 Producer said that they are using the confluent Envelope encryption using AES 256 key and they share the RSA public key with us to decrypt them生产者说他们正在使用使用 AES 256 密钥的融合 Envelope 加密,并且他们与我们共享 RSA 公钥来解密它们

Anyone having the code example in node JS for任何在节点 JS 中有代码示例的人

  1. Connect with kafka consumer与 kafka 消费者建立联系
  2. Decrypt the payload解密有效载荷
  3. Poll records from kafka consumer来自 kafka 消费者的投票记录

Your help much appreciated.非常感谢您的帮助。

  1. Kafka JS library used to consume the records but it was not successful. Kafka JS 库用于消费记录,但没有成功。 So Kafka trigger is added to the lambda所以Kafka触发器被添加到lambda
  2. Decryption done using crypto library使用加密库完成解密
  3. Followed KAfka Js library example for polling records.按照 KAfka Js 库示例进行轮询记录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM