Generic message queue library