Implemented pub-sub feature.