modified per Artem's comments and added pub-sub to support inbound taps