Read config diff from CommitDiffNotification using Java api

Hi,
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(ConfInternal.java:1440)
	at com.tailf.maapi.Maapi.<init>(Maapi.java:234)
	at ConfdNotificationsSubscriber.readTransactionDiff(ConfdNotificationsUtil.java:20)

Here is my code.

public class ConfdNotificationsSubscriber {
    private static Socket notifSock;
    
    public static void processCommitDiffNotifications() throws Exception {
        notifSock = new Socket("127.0.0.1", 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) notif.read();                                
                        readTransactionDiff( n.getTransaction(), n.getUserInfo().getUserId());                        
                        notif.diffNotificationDone(cdn.getTransaction());
                    }
            }
        }).start();
    }

    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);
        maapi.detach(transactionId);
    }
}

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.