Hi Sunil, Producer will throw an Exception in callback if there is problem while sending data. You can check like:
public void onCompletion(RecordMetadata arg0, Exception arg1) { if (arg1 != null) { System.out.println("exception occured"); } System.out.println("sent") On Mon, Aug 17, 2015 at 9:20 PM, sunil kalva <kalva.ka...@gmail.com> wrote: > Hi all > I am using new java producer in async mode, when my entire cluster is down > i am loosing all my messages. How do we get notification when the cluster > is down so that i can send messages to another cluster. The callback is > only triggered when the cluster is reachable . > > --SK > -- Thanks and Regards, Madhukar Bharti Mob: 7845755539