Event publishing

Support for event publishing/subscribing.