What kind of exceptions are caught and sent to callback method, i think when there is IOException callback is not called ? in NetworkClient.java class, from the following code snippet i dont think callback is called for this exaception ?
try { this.selector.poll(Math.min(timeout, metadataTimeout), sends); } catch (IOException e) { log.error("Unexpected error during I/O in producer network thread", e); } On Fri, Mar 20, 2015 at 12:07 AM, Mayuresh Gharat < gharatmayures...@gmail.com> wrote: > Yes. Thats right. I misunderstood, my bad. > > Thanks, > > Mayuresh > > On Thu, Mar 19, 2015 at 11:05 AM, sunil kalva <sambarc...@gmail.com> > wrote: > > > future returns RecordMetadata class which contains only metadata not the > > actual message. > > But i think *steven* had a point like saving the reference in impl class > > and retry if there is an exception in callback method. > > > > On Thu, Mar 19, 2015 at 10:27 PM, Mayuresh Gharat < > > gharatmayures...@gmail.com> wrote: > > > > > Also you can use the other API that returns a Future and save those > > futures > > > into a list and do get() on them to check which message has been sent > and > > > which returned an error so that they can be retried. > > > > > > Thanks, > > > > > > Mayuresh > > > > > > On Thu, Mar 19, 2015 at 9:19 AM, Steven Wu <stevenz...@gmail.com> > wrote: > > > > > > > in your callback impl object, you can save a reference to the actual > > > > message. > > > > > > > > On Wed, Mar 18, 2015 at 10:45 PM, sunil kalva <kalva.ka...@gmail.com > > > > > > wrote: > > > > > > > > > Hi > > > > > How do i access the actual message which is failed to send to > cluster > > > > using > > > > > Callback interface and onCompletion method. > > > > > > > > > > Basically if the sender is failed to send, i want to add it to a > temp > > > > queue > > > > > and retry them later. > > > > > > > > > > --Sunil > > > > > > > > > > > > > > > > > > > > > -- > > > -Regards, > > > Mayuresh R. Gharat > > > (862) 250-7125 > > > > > > > > > > > -- > > SunilKalva > > > > > > -- > -Regards, > Mayuresh R. Gharat > (862) 250-7125 > -- SunilKalva