You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by 朱超 <ch...@baozun.com> on 2019/12/10 03:19:42 UTC

kafka issue

hi:
    I am a gteen hand of kafka,after installation of new kafka cluster,it raises a  question that how do I know which IP address  a message   come from? Is there any special set about this?
Eagerly awaiting your reply.

________________________________
chao.zhu@baozun.com

Re: kafka issue

Posted by Valentin Forst <va...@aseno.de.INVALID>.
> 
> Am 10.12.2019 um 06:36 schrieb Valentin <va...@aseno.de>:
> 
> Hi Chao,
> 
> I suppose, you would like to know:
> within a consumer group which message is coming from which partition, since partitions corresponds to broker and broker = ip, right?
> 
> Well, if you really want to know this, then you have to get the context. E.g within a processor there is a method called context()....
> 
> However, keep in mind broker and IP addresses could change. I would not recommend to build a business logic on top of ip addresses.
> 
> Within a producer, you can manage the destination partition / broker. 
> 
> Regards
> Valentin 
> 
> --
> 
>> Am 10.12.2019 um 04:48 schrieb 朱超 <ch...@baozun.com>:
>> 
>> hi:
>>   I am a gteen hand of kafka,after installation of new kafka cluster,it raises a  question that how do I know which IP address  a message   come from? Is there any special set about this?
>> Eagerly awaiting your reply.
>> 
>> ________________________________
>> chao.zhu@baozun.com


Re: kafka issue

Posted by Valentin <va...@aseno.de>.
Hi Chao,

I suppose, you would like to know:
within a consumer group which message is coming from which partition, since partitions corresponds to broker and broker = ip, right?

Well, if you really want to know this, then you have to get the context. E.g within a processor there is a method called context()....

However, keep in mind broker and IP addresses could change. I would not recommend to build a business logic on top of ip addresses.
 
Within a producer, you can manage the destination partition / broker. 

Regards
Valentin 

--

> Am 10.12.2019 um 04:48 schrieb 朱超 <ch...@baozun.com>:
> 
> hi:
>    I am a gteen hand of kafka,after installation of new kafka cluster,it raises a  question that how do I know which IP address  a message   come from? Is there any special set about this?
> Eagerly awaiting your reply.
> 
> ________________________________
> chao.zhu@baozun.com