Add constructor for case when topic is provide.