Skip to content

Instantly share code, notes, and snippets.

@dspruell
Created July 1, 2022 05:49
Show Gist options
  • Save dspruell/308b94de3e0bb2df083389cbbb0b0ac1 to your computer and use it in GitHub Desktop.
Save dspruell/308b94de3e0bb2df083389cbbb0b0ac1 to your computer and use it in GitHub Desktop.
Test Stream.to_mqtt
import time
from streamz import Stream
def run():
source = Stream.from_mqtt(
"localhost",
1883,
"topic/logpipe_in",
)
output = Stream.to_mqtt(
"localhost",
1883,
"topic/logpipe_out",
)
source.sink(output)
source.start()
while True:
time.sleep(5)
if __name__ == "__main__":
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment