{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/liota/issues/143","repository_url":"https://api.github.com/repos/vmware/liota","labels_url":"https://api.github.com/repos/vmware/liota/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/vmware/liota/issues/143/comments","events_url":"https://api.github.com/repos/vmware/liota/issues/143/events","html_url":"https://github.com/vmware/liota/issues/143","id":248569918,"number":143,"title":"MQTT DCC comms fails with manually constructed MqttMessagingAttributes","user":{"login":"bfrggit","id":2565735,"avatar_url":"https://avatars0.githubusercontent.com/u/2565735?v=4","gravatar_id":"","url":"https://api.github.com/users/bfrggit","html_url":"https://github.com/bfrggit","followers_url":"https://api.github.com/users/bfrggit/followers","following_url":"https://api.github.com/users/bfrggit/following{/other_user}","gists_url":"https://api.github.com/users/bfrggit/gists{/gist_id}","starred_url":"https://api.github.com/users/bfrggit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfrggit/subscriptions","organizations_url":"https://api.github.com/users/bfrggit/orgs","repos_url":"https://api.github.com/users/bfrggit/repos","events_url":"https://api.github.com/users/bfrggit/events{/privacy}","received_events_url":"https://api.github.com/users/bfrggit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-08T00:47:20Z","updated_at":"2017-08-08T02:23:10Z","closed_at":null,"body":"When initializing MQTT DCC comms, I was trying to provide an MqttMessagingAttributes object I constructed myself, using\r\n\r\n```python\r\niotcc = IotControlCenter(MqttDccComms(\r\n    edge_system_name=edge_system.name,\r\n    url=config['BrokerIP'],\r\n    port=config['BrokerPort'],\r\n    identity=identity,\r\n    tls_conf=tls_conf,\r\n    enable_authentication=True,\r\n    mqtt_msg_attr=MqttMessagingAttributes( # manually construct attribute object\r\n        edge_system_name=edge_system.name,\r\n        pub_qos=0\r\n    )\r\n))\r\n```\r\n\r\nGot this error:\r\n```\r\nTraceback (most recent call last):\r\n  File \"./mqtt_debug_plus_qos.py\", line 183, in <module>\r\n    pub_qos=0\r\n  File \"/usr/local/lib/python3.5/dist-packages/liota-0.3-py3.5.egg/liota/dcc_comms/mqtt_dcc_comms.py\", line 113, in __init__\r\n  File \"/usr/local/lib/python3.5/dist-packages/liota-0.3-py3.5.egg/liota/dcc_comms/mqtt_dcc_comms.py\", line 122, in _connect\r\n  File \"/usr/local/lib/python3.5/dist-packages/liota-0.3-py3.5.egg/liota/lib/transports/mqtt.py\", line 177, in __init__\r\n  File \"/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py\", line 491, in __init__\r\n    raise ValueError('A client id must be provided if clean session is False.')\r\nValueError: A client id must be provided if clean session is False.\r\n```"},"comment":{"url":"https://api.github.com/repos/vmware/liota/issues/comments/320831793","html_url":"https://github.com/vmware/liota/issues/143#issuecomment-320831793","issue_url":"https://api.github.com/repos/vmware/liota/issues/143","id":320831793,"user":{"login":"Venkat2811","id":10533729,"avatar_url":"https://avatars1.githubusercontent.com/u/10533729?v=4","gravatar_id":"","url":"https://api.github.com/users/Venkat2811","html_url":"https://github.com/Venkat2811","followers_url":"https://api.github.com/users/Venkat2811/followers","following_url":"https://api.github.com/users/Venkat2811/following{/other_user}","gists_url":"https://api.github.com/users/Venkat2811/gists{/gist_id}","starred_url":"https://api.github.com/users/Venkat2811/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Venkat2811/subscriptions","organizations_url":"https://api.github.com/users/Venkat2811/orgs","repos_url":"https://api.github.com/users/Venkat2811/repos","events_url":"https://api.github.com/users/Venkat2811/events{/privacy}","received_events_url":"https://api.github.com/users/Venkat2811/received_events","type":"User","site_admin":false},"created_at":"2017-08-08T02:23:10Z","updated_at":"2017-08-08T02:23:10Z","body":"Yes.  This is valid and has been intentionally left for paho mqtt library to raise error instead of raising at liota transports .  If `clean_session` is `False`, a unique `client_id` must be provided.\r\n\r\nAlso in IoTCC, we use auto-generated topics.  Please refer to [README](https://github.com/vmware/liota/blob/master/examples/mqtt/README.md) for various mqtt configurations available."}}
{"actor":{"display_login":"Venkat2811"}}