Added check for hostanme in topic subscription/publishing