pub sub and basic routines example