change format and change declaration of metadata to uint16_t
Merge branch 'master' of https://github.com/BullSoft/mysql-replication-listener
it is better using while()