As you may remember we have explained
Today we are gonna give a python example of the
I prefer not to clutter the post by pasting the whole script here. :)
module which causes
Usecases are endless! You can use as part of messaging infrastructure in your microservice environment or as a chat system, you name it! :)
#python #redis #pubsub #publish #subscribe #thread
redis pubsub in which someone subscribe to a specific channel and then another console publish messages to that channel. The publisher has no idea who is listening on the other side, it just publish messages which is received.Today we are gonna give a python example of the
redis pubsub using threading and redis python module. Take a look at the code in the link below:https://gist.github.com/alirezastack/ff2515cc434360f544d8a9341155947e
I prefer not to clutter the post by pasting the whole script here. :)
subscribe method is used to subscribe to a given channel, here it is called test. start method is used as part of the threadingmodule which causes
run method to be called. Both run and start is Thread super class methods. When you run the script it will subscribe to test channel and wait for new messages.NOTE: you can publish to test channel in redis console (`redis-cli`) as below:127.0.0.1:6379> publish test hello_python
(integer) 1
Usecases are endless! You can use as part of messaging infrastructure in your microservice environment or as a chat system, you name it! :)
#python #redis #pubsub #publish #subscribe #thread
EMQ X broker is a fully open source, highly scalable, highly available distributed MQTT messaging broker for IoT, M2M and Mobile applications that can handle tens of millions of concurrent clients.
Starting from 3.0 release, EMQ X broker fully supports MQTT V5.0 protocol specifications and backward compatible with MQTT V3.1 and V3.1.1, as well as other communication protocols such as MQTT-SN, CoAP, LwM2M, WebSocket and STOMP. The 3.0 release of the EMQ X broker can scaled to 10+ million concurrent MQTT connections on one cluster.
#github #emqx #mqtt #pubsub #wss #ws #websocket #web_socket
Starting from 3.0 release, EMQ X broker fully supports MQTT V5.0 protocol specifications and backward compatible with MQTT V3.1 and V3.1.1, as well as other communication protocols such as MQTT-SN, CoAP, LwM2M, WebSocket and STOMP. The 3.0 release of the EMQ X broker can scaled to 10+ million concurrent MQTT connections on one cluster.
https://github.com/emqx/emqx
#github #emqx #mqtt #pubsub #wss #ws #websocket #web_socket