jBinlog is a lib which helps to parse Mysql's binlog.
With jBinlog, you can treat a mysql server as a queue, and get every insert/update/delete action and data as a message. In other words, you can make your program act like a mysql slave, and do whatever you like when the dataset in db changes.
jBinlog is not ready for use now, I am working on it.