mirror of
https://github.com/OMGeeky/flucto-heisskleber.git
synced 2025-12-28 15:28:11 +01:00
* WIP: Added async file reader. * Async resampling and synchronization refactored. * Add async mqtt publisher. Remove queue from joint. * Add async zmq publisher and subscriber. * Modify integration tests for streaming. * Name refactoring resampler. * Added async source/sink to factory. * Refactor joint and add integration tests. * Add termcolor dev dependency * Add conosole source and sink * Add cli interface for different protocols * Removed files unfit for merge. * Fix review requests. * Restore use of $MSB_CONFIG_DIR for now. It seems that the default behaviour is not looking for .config/heisskleber * Remove version test, causing unnecessary failures.
19 lines
457 B
Python
19 lines
457 B
Python
import asyncio
|
|
|
|
from heisskleber.mqtt import AsyncMqttSubscriber, MqttConf
|
|
|
|
|
|
async def main():
|
|
conf = MqttConf(broker="localhost", port=1883, user="", password="")
|
|
sub = AsyncMqttSubscriber(conf, topic="#")
|
|
# async for topic, message in sub:
|
|
# print(message)
|
|
# _ = asyncio.create_task(sub.run())
|
|
while True:
|
|
topic, message = await sub.receive()
|
|
print(message)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
asyncio.run(main())
|