Re: which port should I use 9091 or 9092 or 2181 to send messages through kafka when using a client Library?

2016-09-15 Thread kant kodali
@Umesh According to these examples it looks like producer and consumer
specifies bootstrap.servers. What is PLAINTEXT? do I need to change something
here https://github.com/apache/kafka/blob/trunk/config/server.properties ?
because when I specify port 9092 for both producer consumer or just either of
them it doesn't seem to work. Only when I specify zookeeper port it seems to
work and I don't know why?

https://github.com/apache/kafka/blob/trunk/examples/src/main/java/kafka/examples/Producer.java#L34
https://github.com/apache/kafka/blob/trunk/examples/src/main/java/kafka/examples/Consumer.java

 





On Thu, Sep 15, 2016 8:15 AM, UMESH CHAUDHARY umesh9...@gmail.com
wrote:
No that is not required, when you use new consumer API. You have to

specify bootstrap.servers,

which will have 9092 (for PLAINTEXT usually ).

In old consumer API you need zookeeper server which points on 2181.




On Thu, 15 Sep 2016 at 17:03 kant kodali  wrote:




> I haven't changed anything from

> https://github.com/apache/kafka/blob/trunk/config/server.properties

> and it looks like it is pointing to zookeeper.

> Question:

> Does producer client need to point 9092 and Consumer need to point 2181?

> is that

> the standard? Why not both point to the same thing?

>

>

>

>

>

>

> On Thu, Sep 15, 2016 4:24 AM, Ali Akhtar ali.rac...@gmail.com

> wrote:

> Examine server.properties and see which port you're using in there

>

>

>

>

> On Thu, Sep 15, 2016 at 3:52 PM, kant kodali  wrote:

>

>

>

>

> > which port should I use 9091 or 9092 or 2181 to send messages through

> kafka

>

> > when using a client Library?

>

> > I start kafka as follows:

>

> > sudo bin/zookeeper-server-start.sh config/zookeeper.propertiessudo

>

> > ./bin/kafka-server-start.sh config/server.properties

>

> >

>

> > and I dont see any process running on 9091 or 9092 however lot of client

>

> > library

>

> > examples have a consumer client pointing to 9092. for example here

>

> > https://github.com/apache/kafka/blob/trunk/examples/src/main

>

> > /java/kafka/examples/Producer.java#L34

>

> > shouldn't both producer and consumer point to zookeeper port 2181? which

> I

>

> > am

>

> > assuming will do the lookup?

>

> > Thanks,Kant

Re: which port should I use 9091 or 9092 or 2181 to send messages through kafka when using a client Library?

2016-09-15 Thread UMESH CHAUDHARY
No that is not required, when you use new consumer API. You have to
specify bootstrap.servers,
which will have 9092 (for PLAINTEXT usually ).
In old consumer API you need zookeeper server which points on 2181.

On Thu, 15 Sep 2016 at 17:03 kant kodali  wrote:

> I haven't changed anything from
> https://github.com/apache/kafka/blob/trunk/config/server.properties
> and it looks like it is pointing to zookeeper.
> Question:
> Does producer client need to point 9092 and Consumer need to point 2181?
> is that
> the standard? Why not both point to the same thing?
>
>
>
>
>
>
> On Thu, Sep 15, 2016 4:24 AM, Ali Akhtar ali.rac...@gmail.com
> wrote:
> Examine server.properties and see which port you're using in there
>
>
>
>
> On Thu, Sep 15, 2016 at 3:52 PM, kant kodali  wrote:
>
>
>
>
> > which port should I use 9091 or 9092 or 2181 to send messages through
> kafka
>
> > when using a client Library?
>
> > I start kafka as follows:
>
> > sudo bin/zookeeper-server-start.sh config/zookeeper.propertiessudo
>
> > ./bin/kafka-server-start.sh config/server.properties
>
> >
>
> > and I dont see any process running on 9091 or 9092 however lot of client
>
> > library
>
> > examples have a consumer client pointing to 9092. for example here
>
> > https://github.com/apache/kafka/blob/trunk/examples/src/main
>
> > /java/kafka/examples/Producer.java#L34
>
> > shouldn't both producer and consumer point to zookeeper port 2181? which
> I
>
> > am
>
> > assuming will do the lookup?
>
> > Thanks,Kant


Re: which port should I use 9091 or 9092 or 2181 to send messages through kafka when using a client Library?

2016-09-15 Thread kant kodali

I haven't changed anything from
https://github.com/apache/kafka/blob/trunk/config/server.properties
and it looks like it is pointing to zookeeper.
Question:
Does producer client need to point 9092 and Consumer need to point 2181? is that
the standard? Why not both point to the same thing?






On Thu, Sep 15, 2016 4:24 AM, Ali Akhtar ali.rac...@gmail.com
wrote:
Examine server.properties and see which port you're using in there




On Thu, Sep 15, 2016 at 3:52 PM, kant kodali  wrote:





which port should I use 9091 or 9092 or 2181 to send messages through kafka



when using a client Library?



I start kafka as follows:



sudo bin/zookeeper-server-start.sh config/zookeeper.propertiessudo



./bin/kafka-server-start.sh config/server.properties







and I dont see any process running on 9091 or 9092 however lot of client



library



examples have a consumer client pointing to 9092. for example here



https://github.com/apache/kafka/blob/trunk/examples/src/main



/java/kafka/examples/Producer.java#L34



shouldn't both producer and consumer point to zookeeper port 2181? which I



am



assuming will do the lookup?



Thanks,Kant

Re: which port should I use 9091 or 9092 or 2181 to send messages through kafka when using a client Library?

2016-09-15 Thread Ali Akhtar
Examine server.properties and see which port you're using in there

On Thu, Sep 15, 2016 at 3:52 PM, kant kodali  wrote:

> which port should I use 9091 or 9092 or 2181 to send messages through kafka
> when using a client Library?
> I start kafka as follows:
> sudo bin/zookeeper-server-start.sh config/zookeeper.propertiessudo
> ./bin/kafka-server-start.sh config/server.properties
>
> and I dont see any process running on 9091 or 9092 however lot of client
> library
> examples have a consumer client pointing to 9092. for example here
> https://github.com/apache/kafka/blob/trunk/examples/src/main
> /java/kafka/examples/Producer.java#L34
> shouldn't both producer and consumer point to zookeeper port 2181? which I
> am
> assuming will do the lookup?
> Thanks,Kant