Package: powerful-pipes-watch-bus
Powerful Pipes Watcher - Multi-broker watcher tool with the power of UNIX PipesIndexInstallQuick StartWatchBusSendBusAs a Python librarySupported brokersRedis examplesRedis Simple Queue ListenerRedis Pub / SubRedis StreamsAuthorsLicenseContributionsAcknowledgementsIn a nutshellPowerful Pipes Watcheris a multi broker watcher tool that connect them with UNIX pipes.Install>pipinstallpowerful-pipes-watch-busQuick StartWatchBusPowerful Pipes Watcher read from a broker queue and re-send received data to the UNIX pipeline.Example>watch-bus-credis://-qmy-queueAbove command will connect to the localhost Redis at default port, at database number 1, and will listen formy-queuequeue.Example with multiple queues>watch-bus-credis://-qmy-queue-qsecond-queueWith this command watch-bus will listen from two queues events.SendBusPowerful Pipes SendBus read from stdin and re-send received JSON data to the Broker queue(s).Example>catdata.json|send-bus-credis://-qmy-queueAbove command will connect to the localhost Redis at default port, at database number 1, and will listen formy-queuequeue.Example with multiple queues>catdata.json|send-bus-credis://-qmy-queue-qsecond-queueWith this command sendBus will send data to two broker queues.As a Python libraryYou also can usePowerful Pipes Watcheras a Python library in your Python code:frompowerful_pipes_watch_busimportconnect_busdefmain():redis_connection=connect_bus("redis+pubsub://localhost:6379/?db=0&channel=my-channel")formessageinredis_connection.read_json_messages():redis_connection.send_json_message(message,"my-other-queue")if__name__=="__main__":main()Supported brokersCurrently, supported brokers are:Redis Pub/SubRedis StreamsRedis simple Queue listenerWe'll be happy if you want to contribute adding new brokers! :)Redis examplesRedis Simple Queue ListenerBus connections for Redis should look like:redis://[[user]:[password]@][host][:port][/?db=INTEGER][&queue=STRING]]Default values:user: Nullpassword: NullHost: 127.0.0.1port: 6379db: 1queue: defaultRedis Pub / SubBus connections for Redis should look like:redis+pubsub://[[user]:[password]@][host][:port][/?[db=INTEGER][&channel=STRING]]channel is the pub/sub channel to listen for.Default values:user: Nullpassword: NullHost: 127.0.0.1port: 6379db: 1channel: defaultRedis StreamsBus connections for Redis should look like:redis+streams://[[user]:[password]@][host][:port]/?stream=STRING[&db=INTEGER][&group=STRING][&consumer=STRING][&timeout=INTEGER][&batch_size=INTEGER][&persistent=BOOLEAN]This mode can works as a consumer or as a producer, depending on the parameters.ConsumerIf you want to use the Redis Streams as a consumer, you should specify thegroupandconsumerparameters.ProducerIf you want to use the Redis Streams as a producer, you should specify ONLY thestreamparameter.Mandatory parametersstream: The stream name to listen for.Default values:user: Nullpassword: NullHost: 127.0.0.1port: 6379db: 1consumer: "auto" (will be generated automatically)persistent: False. If True, the consumer will be created as persistent.AuthorsPowerful Pipes was made by 42Crunch Research Team:jc42cr0hnLicensePowerful Pipes is Open Source and available under theAGPLv3+.ContributionsContributions are very welcome. SeeCONTRIBUTING.mdor skim existing tickets to see where you could help out.AcknowledgementsProject logo thanks toCamera control vector created by upklyak.