I have subscribed to multiple (around 4) topics using paho.mqtt. 
On receiving message from each topic, I want to buffer the message until it reaches some threshold and then later insert bulk messages into MySQL database.I want to gather some 1000 messages and check if the threshold is greater than 1000 and then finally insert into database on certain time interval (for every 1 minute). 
For each topic, there is corresponding table in the database. Which callback function Should I use on_message() callback or message_callback_add()? Which is better in such scenario?
What does "is better" mean for you?
The callback registered with on_message() will get all messages for all your subscriptions, whereas with message_callback_add you can have different callbacks for each topic that you subscribe to.
Do you need your callbacks to do different things based on the topic name? If not, you use on_message, else you use message_callback_add.
Paho mqtt callbacks on multiple subscription