Made changes to not send messages if creation of topics fails

#2542 #2541