add support for pub/sub message pattern