create a standard script for consuming messages