public void ack(long batchId) throws CanalClientException {
waitClientRunning();
ClientAck ca = ClientAck.newBuilder().setDestination(clientIdentity.getDestination()).setClientId(String.valueOf(clientIdentity.getClientId())).setBatchId(batchId).build();
try {
writeWithHeader(channel,
Packet.newBuilder().setType(PacketType.CLIENTACK).setBody(ca.toByteString()).build().toByteArray());
} catch (IOException e) {
throw new CanalClientException(e);
}
}