Apache kafka中的关联ID [英] Correlation Id in Apache kafka
问题描述
无论如何,是否存在一个基于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.
这篇关于Apache kafka中的关联ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!