Created
July 1, 2022 05:49
-
-
Save dspruell/308b94de3e0bb2df083389cbbb0b0ac1 to your computer and use it in GitHub Desktop.
Test Stream.to_mqtt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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