Generic message storing mechanism