Refactor broker into publisher and subscriber

Why not discard the messages if no callback is registered?