Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> Producer.send questions


Copy link to this message
-
Re: Producer.send questions
Since these errors are recoverable, the producer client can retry the
requests. kafka.javaapi.producer.Producer does the same.

Thanks,
Neha
On Fri, Aug 23, 2013 at 9:41 PM, Vadim Keylis <[EMAIL PROTECTED]> wrote:

> Jun. In general how one will recover from NotLeaderForPartitionException?
> What are the steps?
>
> Thanks,
> Vadim
>
>
> On Fri, Aug 23, 2013 at 9:07 PM, Jun Rao <[EMAIL PROTECTED]> wrote:
>
> > For the most part, only SocketExceptions and
> NotLeaderForPartitionException
> > are recoverable. MessageSizeTooLargeException may be recoverable with a
> > smaller batch size.
> >
> > Thanks,
> >
> > Jun
> >
> >
> > On Fri, Aug 23, 2013 at 4:09 PM, Jason Rosenberg <[EMAIL PROTECTED]>
> wrote:
> >
> > > I'm using the kafka.javaapi.producer.Producer class from a java client.
> > >  I'm wondering if it ever makes sense to refresh a producer by stopping
> > it
> > > and creating a new one, for example in response to a downstream IO
> error
> > > (e.g. a broker got restarted, or a stale socket, etc.).
> > >
> > > Or should it always be safe to rely on the producer's implementation to
> > > manage it's pool of BlockingChannel connections, etc.
> > >
> > > I'm also interested in trying to understand which exceptions indicate a
> > > failed send() request might be retryable (basically anything that
> doesn't
> > > involve a data-dependent problem, like a malformed message, or a
> message
> > > too large, etc.).
> > >
> > > Unfortunately, the range of Exceptions that can be thrown by the
> various
> > > javaapi methods is not yet well documented.  It would be nice to have
> > some
> > > notion of whether an exception is the result of a data error, or a
> > > transient downstream connection error, etc.
> > >
> > > Jason
> > >
> >
>

 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB