pg replication connection not returns wal events to java code client , it hangs some times
I have fixed issue using SQL slot creation sql command.
Removed below code which blocks executions 
     ReplicationSlotInfo info=       replConnection.getReplicationAPI()
                    .createReplicationSlot()
                    .logical()
                    .withSlotName(slotName)
                    .withOutputPlugin(wal2json)
                    .make();

And my issue was fixed.
Let me know if anyone face same issue I can help.