ResponseError: Confluent_Schema_Registry - Error, status 400



我在Nodejs中使用kafkajs和confluent-schema-registry我可以记录这条信息。值(avro),但我有一个错误,当试图解码它。它说:ResponseError: Confluent_Schema_Registry - Error, status 400

const payload = await registry.decode(message.value).catch(error => {
console.log('error consuming payload', error);
});

如果您的avro模式URL在https上,那么尝试在初始化schemareregistry时指定Agent。

const registry = new SchemaRegistry({
host: 'Your host on https',
// if you have auth for schema url
auth: {
username: 'username for schema url',
password: 'password for schema url'
},
// specifying below agent explicitly helped us
agent: new https.Agent({
rejectUnauthorized: false
})
})

相关内容

最新更新