You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Vinicius Carvalho <vi...@gmail.com> on 2013/07/09 20:58:22 UTC

Network and partition

Hi there. I'm working on a 0.8 version of the protocol for nodejs. And when
thing that I'm not clear from the docs:

"The client will likely need to maintain a connection to multiple brokers,
as data is partitioned and the clients will need to talk to the server that
has their data"

Ok, so far so good. Once I have the initial metadata request I would know
which broker has each partition.

But then looking at the BNF for producerequest:

RequiredAcks Timeout [TopicName [Partition MessageSetSize MessageSet]]

What happens if a client send a message to a topic and partition that is
not on the broker the message was sent to?

What happens in case the client does not specify a partition and the topic
was created with multiple partitions?

Regards

-- 
The intuitive mind is a sacred gift and the
rational mind is a faithful servant. We have
created a society that honors the servant and
has forgotten the gift.

Re: Network and partition

Posted by Vinicius Carvalho <vi...@gmail.com>.
Thanks Jun


On Wed, Jul 10, 2013 at 12:17 AM, Jun Rao <ju...@gmail.com> wrote:

> For 1, you will get a response with an error.
>
> For 2, a partition # has to be specified. If it is incorrect, you will get
> a response with an error.
>
> Thanks,
>
> Jun
>
>
> On Tue, Jul 9, 2013 at 11:58 AM, Vinicius Carvalho <
> viniciusccarvalho@gmail.com> wrote:
>
> > Hi there. I'm working on a 0.8 version of the protocol for nodejs. And
> when
> > thing that I'm not clear from the docs:
> >
> > "The client will likely need to maintain a connection to multiple
> brokers,
> > as data is partitioned and the clients will need to talk to the server
> that
> > has their data"
> >
> > Ok, so far so good. Once I have the initial metadata request I would know
> > which broker has each partition.
> >
> > But then looking at the BNF for producerequest:
> >
> > RequiredAcks Timeout [TopicName [Partition MessageSetSize MessageSet]]
> >
> > What happens if a client send a message to a topic and partition that is
> > not on the broker the message was sent to?
> >
> > What happens in case the client does not specify a partition and the
> topic
> > was created with multiple partitions?
> >
> > Regards
> >
> > --
> > The intuitive mind is a sacred gift and the
> > rational mind is a faithful servant. We have
> > created a society that honors the servant and
> > has forgotten the gift.
> >
>



-- 
The intuitive mind is a sacred gift and the
rational mind is a faithful servant. We have
created a society that honors the servant and
has forgotten the gift.

Re: Network and partition

Posted by Jun Rao <ju...@gmail.com>.
For 1, you will get a response with an error.

For 2, a partition # has to be specified. If it is incorrect, you will get
a response with an error.

Thanks,

Jun


On Tue, Jul 9, 2013 at 11:58 AM, Vinicius Carvalho <
viniciusccarvalho@gmail.com> wrote:

> Hi there. I'm working on a 0.8 version of the protocol for nodejs. And when
> thing that I'm not clear from the docs:
>
> "The client will likely need to maintain a connection to multiple brokers,
> as data is partitioned and the clients will need to talk to the server that
> has their data"
>
> Ok, so far so good. Once I have the initial metadata request I would know
> which broker has each partition.
>
> But then looking at the BNF for producerequest:
>
> RequiredAcks Timeout [TopicName [Partition MessageSetSize MessageSet]]
>
> What happens if a client send a message to a topic and partition that is
> not on the broker the message was sent to?
>
> What happens in case the client does not specify a partition and the topic
> was created with multiple partitions?
>
> Regards
>
> --
> The intuitive mind is a sacred gift and the
> rational mind is a faithful servant. We have
> created a society that honors the servant and
> has forgotten the gift.
>