Apache kafka中的关联ID [英] Correlation Id in Apache kafka

查看:80
本文介绍了Apache kafka中的关联ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论如何,是否存在一个基于correlationID(类似于JMS规范中的那个)在kafka中接收消息的消息.我想创建一组消费者,他们从相同的主题进行监听,但相关性ID不同?

Is there anyway to receive messages in kafka based on a correlationID ( similar to the one in JMS Specification ). I want to create a set of consumers listening from the same topic but with different correlation Id's ?

推荐答案

correlationId是每个TCP连接工件,它允许客户端(生产者或消费者)将代理的响应映射到客户端的先前请求,它具有在特定的TCP连接之外没有任何意义.

correlationId is a per TCP connection artifact that allows the client (producer or consumer) to map a response from the broker to a previous request by the client, it has no meaning outside that specific TCP connection.

CorrelationId-这是用户提供的整数.服务器将在未经修改的情况下将其传递回响应中.对于在客户端和服务器之间匹配请求和响应非常有用.

CorrelationId - This is a user-supplied integer. It will be passed back in the response by the server, unmodified. It is useful for matching request and response between the client and server.

https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-Requests

这篇关于Apache kafka中的关联ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆