DSL for publisher and subscriber definitions

Closes #23