You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by ma...@kafkatool.com on 2016/02/05 00:01:10 UTC
Detecting broker version programmatically
Is there a way to detect the broker version (even at a high level 0.8 vs
0.9) using the kafka-clients Java library?
--
Best regards,
Marko
www.kafkatool.com
Re: Detecting broker version programmatically
Posted by tao xiao <xi...@gmail.com>.
I think you can try with
https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/common/utils/AppInfoParser.java
On Fri, 5 Feb 2016 at 07:01 <ma...@kafkatool.com> wrote:
> Is there a way to detect the broker version (even at a high level 0.8 vs
> 0.9) using the kafka-clients Java library?
>
> --
> Best regards,
> Marko
> www.kafkatool.com
>
>
Re: Detecting broker version programmatically
Posted by ma...@kafkatool.com.
This sounds like a good approach, since it does not depend on JMX. There
doesn't seem to be an easy way to make these API calls using the new
Java-client, though. Everything is kind of hidden behind the KafkaConsumer
and KafkaProducer classes.
Marko
www.kafkatool.com
> I think it is possible to infer a version based on a remote broker's
> response to various newer api methods. I wrote some probes in python that
> check ListGroups for 0.9, GroupCoordinatorRequest for 0.8.2,
> OffsetFetchRequest for 0.8.1, and MetadataRequest for 0.8.0. It seems to
> work well enough.
>
> Also, this is related to KIP 35:
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-35+-+Retrieving+protocol+version
>
> -Dana
Re: Detecting broker version programmatically
Posted by Dana Powers <da...@gmail.com>.
I think it is possible to infer a version based on a remote broker's
response to various newer api methods. I wrote some probes in python that
check ListGroups for 0.9, GroupCoordinatorRequest for 0.8.2,
OffsetFetchRequest for 0.8.1, and MetadataRequest for 0.8.0. It seems to
work well enough.
Also, this is related to KIP 35:
https://cwiki.apache.org/confluence/display/KAFKA/KIP-35+-+Retrieving+protocol+version
-Dana
On Feb 4, 2016 8:28 PM, "Manikumar Reddy" <ku...@nmsworks.co.in> wrote:
> Currently it is available through JMX Mbean. It is not available on wire
> protocol/requests.
>
> Pending JIRAs related to this:
> https://issues.apache.org/jira/browse/KAFKA-2061
>
> On Fri, Feb 5, 2016 at 4:31 AM, <ma...@kafkatool.com> wrote:
>
> > Is there a way to detect the broker version (even at a high level 0.8 vs
> > 0.9) using the kafka-clients Java library?
> >
> > --
> > Best regards,
> > Marko
> > www.kafkatool.com
> >
> >
>
Re: Detecting broker version programmatically
Posted by Manikumar Reddy <ku...@nmsworks.co.in>.
@James
It is broker-id for Kafka server and client-id for java
producer/consumer apps
@Dana
Yes, we can infer using custom logic.
Re: Detecting broker version programmatically
Posted by James Cheng <jc...@tivo.com>.
> On Feb 4, 2016, at 8:28 PM, Manikumar Reddy <ku...@nmsworks.co.in> wrote:
>
> Currently it is available through JMX Mbean. It is not available on wire
> protocol/requests.
>
The name of the JMX Mbean is kafka.server:type=app-info,id=4
Not sure what the id=4 means.
-James
> Pending JIRAs related to this:
> https://issues.apache.org/jira/browse/KAFKA-2061
>
> On Fri, Feb 5, 2016 at 4:31 AM, <ma...@kafkatool.com> wrote:
>
>> Is there a way to detect the broker version (even at a high level 0.8 vs
>> 0.9) using the kafka-clients Java library?
>>
>> --
>> Best regards,
>> Marko
>> www.kafkatool.com
>>
>>
________________________________
This email and any attachments may contain confidential and privileged material for the sole use of the intended recipient. Any review, copying, or distribution of this email (or any attachments) by others is prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete this email and any attachments. No employee or agent of TiVo Inc. is authorized to conclude any binding agreement on behalf of TiVo Inc. by email. Binding agreements with TiVo Inc. may only be made by a signed written agreement.
Re: Detecting broker version programmatically
Posted by Manikumar Reddy <ku...@nmsworks.co.in>.
Currently it is available through JMX Mbean. It is not available on wire
protocol/requests.
Pending JIRAs related to this:
https://issues.apache.org/jira/browse/KAFKA-2061
On Fri, Feb 5, 2016 at 4:31 AM, <ma...@kafkatool.com> wrote:
> Is there a way to detect the broker version (even at a high level 0.8 vs
> 0.9) using the kafka-clients Java library?
>
> --
> Best regards,
> Marko
> www.kafkatool.com
>
>