You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Helin Xiang <xk...@gmail.com> on 2013/01/22 03:56:50 UTC

no exceptions when producer send messages to a opened port that is not a broker

Hi,

I am doing some tests about kafka, and I found this:

I was going to use the zookeeper to find broker, but somehow I set the
producer's property containing "port=xxx", it actually connect to a
'broker' on "localhost:xxx"; but the port is used for another service (a
thrift server, not a kafka broker),

so the real thing is *a producer send messages to a opened port that is not
a broker, and it didn't throw any exception*(I think catched all the
exceptions).

I wonder why it didnot throw any exception. could someone explain it OR how
can I catch those exceptions?

thanks



-- 
*Best Regards

Helin Xiang*

Re: no exceptions when producer send messages to a opened port that is not a broker

Posted by Helin Xiang <xk...@gmail.com>.
Thanks. I am really looking forward to version 0.8 release


On Tue, Jan 22, 2013 at 1:17 PM, Jun Rao <ju...@gmail.com> wrote:

> This is true in 0.7 since the producer doesn't receive any ack. So, unless
> the other side closes the socket on a wrong request, the producer client
> won't know that sth is wrong on the server.
>
> In 0.8, the producer will wait for an ack from the broker and will timeout
> if no response is received.
>
> Thanks,
>
> Jun
>
> On Mon, Jan 21, 2013 at 6:56 PM, Helin Xiang <xk...@gmail.com> wrote:
>
> > Hi,
> >
> > I am doing some tests about kafka, and I found this:
> >
> > I was going to use the zookeeper to find broker, but somehow I set the
> > producer's property containing "port=xxx", it actually connect to a
> > 'broker' on "localhost:xxx"; but the port is used for another service (a
> > thrift server, not a kafka broker),
> >
> > so the real thing is *a producer send messages to a opened port that is
> not
> > a broker, and it didn't throw any exception*(I think catched all the
> > exceptions).
> >
> > I wonder why it didnot throw any exception. could someone explain it OR
> how
> > can I catch those exceptions?
> >
> > thanks
> >
> >
> >
> > --
> > *Best Regards
> >
> > Helin Xiang*
> >
>



-- 
*Best Regards

向河林*

Re: no exceptions when producer send messages to a opened port that is not a broker

Posted by Jun Rao <ju...@gmail.com>.
This is true in 0.7 since the producer doesn't receive any ack. So, unless
the other side closes the socket on a wrong request, the producer client
won't know that sth is wrong on the server.

In 0.8, the producer will wait for an ack from the broker and will timeout
if no response is received.

Thanks,

Jun

On Mon, Jan 21, 2013 at 6:56 PM, Helin Xiang <xk...@gmail.com> wrote:

> Hi,
>
> I am doing some tests about kafka, and I found this:
>
> I was going to use the zookeeper to find broker, but somehow I set the
> producer's property containing "port=xxx", it actually connect to a
> 'broker' on "localhost:xxx"; but the port is used for another service (a
> thrift server, not a kafka broker),
>
> so the real thing is *a producer send messages to a opened port that is not
> a broker, and it didn't throw any exception*(I think catched all the
> exceptions).
>
> I wonder why it didnot throw any exception. could someone explain it OR how
> can I catch those exceptions?
>
> thanks
>
>
>
> --
> *Best Regards
>
> Helin Xiang*
>