[feature] added implementation of the api call related to connect and publish for mqtt layer