Add basic publish / subscribe functionality and tests.