def main(): # ------------------------------------------------------------------------ # # 0. Subscribe to the broker # ------------------------------------------------------------------------ # receiver = Receiver() # Connect to the data hub receiver.connect(host=DATA_HUB_IP, uname=DATA_HUB_UNAME, pwd=DATA_HUB_PWD) # Connect to the exchange receiver.get_data_from_exchange(ex_name=EX_NAME, topic=SUB_TOPIC, callback=process_data)
def main(): # ------------------------------------------------------------------------ # # 0. Subscribe to the broker # ------------------------------------------------------------------------ # receiver = Receiver() # Connect to the data hub uname = "admin" password = "******" receiver.connect(host=DATA_HUB_IP, uname=uname, pwd=password) # Connect to the exchange receiver.get_data_from_exchange(ex_name=EX_NAME, topic=SUB_TOPIC, callback=process_data)