Messaging interface and implementation for various messaging protocols