Add helper function for parsing completion callback messages

Signed-off-by: Momchil Atanasov <m.momchil@gmail.com>