subscriber.subscribe(subscription_path, callback=callback)
sleep_count = 0
print("Listening for messages on {}".format(subscription_path))
while sleep_count < duration:
time.sleep(1)
sleep_count = sleep_count + 1
def parse_command_line_args():
Parse command line arguments.
parser = argparse.ArgumentParser(description=(
"Google Cloud IoT Core MQTT binary transmission demo."))
After Change
print("Listening for messages on {}".format(subscription_path))
finished = job_done.wait(timeout=timeout)
if not finished:
print("No event received before the timeout.")
def parse_command_line_args():
Parse command line arguments.