Read config diff from CommitDiffNotification using Java api

I am trying to process commit diff notifications using Java Api to read changes in config part of the transaction.

How ever, seeing error when trying to use maapi diff iterate.

Maapi initialization hangs for sometime and throws below exception.

com.tailf.conf.ConfException: expected 9 bytes from socket, only got -1
	at com.tailf.conf.ConfInternal.doConnect(
	at com.tailf.maapi.Maapi.<init>(
	at ConfdNotificationsSubscriber.readTransactionDiff(

Here is my code.

public class ConfdNotificationsSubscriber {
    private static Socket notifSock;
    public static void processCommitDiffNotifications() throws Exception {
        notifSock = new Socket("", Conf.PORT);
        Notif notif = new Notif(notifSock, EnumSet.of(NotificationType.NOTIF_COMMIT_DIFF));
        new Thread(new Runnable() {  
            public void run() {
                    while (true) {
                        CommitDiffNotification n = (CommitDiffNotification);                                
                        readTransactionDiff( n.getTransaction(), n.getUserInfo().getUserId());                        

    private static void readTransactionDiff(int transactionId, int userId) {
        Maapi maapi = new Maapi(notifSock);
        maapi.attach(transactionId, 0, userId);
        MaapiDiffIterate diffIterator = new MaapiDiffIterate() {
			public DiffIterateResultFlag iterate(ConfObject[] paramArrayOfConfObject,
					DiffIterateOperFlag flag,
					ConfObject confObj1, ConfObject confObj2, Object obj) {
				// Iterate diff
				return DiffIterateResultFlag.ITER_CONTINUE;
        maapi.diffIterate(transactionId, diffIterator);

To help debug ConfD applications written using the Java API, it is best to file RT tickets with our support team.

Thanks for reply. I filed a ticket (#27006).
Please take a look.