Difference between Redis pub/sub and MQTT #84
-
Hi all, Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
At a high level, Redis Pub/Sub is a basic fire and forget in memory pub/sub implementation while MQTT is a more robust implementation that is more resilient and handles heavy loads better. Redis Pub/Sub doesn't require an addition broker since it uses the Redis instance already running for the Database. MQTT requires the additional MQTT Broker service to be running. |
Beta Was this translation helpful? Give feedback.
-
Redis pubsub has a 32 MB limit and MQTT has an upper 260MB limit Its hard to say why you are having memory issues offhand as things like excessive buffering of the data (i.e. trying to read the entire message into memory all at once) can balloon memory usage and cause issues if you don't have enough system or process memory (32-bit application?) MQTT client authentication is supported in the latest EdgeX release, for both username password and tls client authentication (also supports anonymous with just server side TLS auth based on a CA certificate). Note that the current EdgeX security policy is that it is left up to the adopter to secure network communication that is leaving the host. EdgeX does not implement TLS between any of its microservices as, among other reasons, it introduces a key management problem that can't be solved internally. (For example, when a TLS cert expires, should EdgeX terminate to pick up new keying material?) The one exception is that the API gateway has an untrusted TLS certificate, which is guaranteed to be untrusted and supposed to be replaced with an adopter-specified certificate. |
Beta Was this translation helpful? Give feedback.
-
Neither Redis pub/sub or MQTT should handle the 50MB streaming data. Your application service should connect to the streaming source directly, such as using RSTP for an USB camera. |
Beta Was this translation helpful? Give feedback.
At a high level, Redis Pub/Sub is a basic fire and forget in memory pub/sub implementation while MQTT is a more robust implementation that is more resilient and handles heavy loads better. Redis Pub/Sub doesn't require an addition broker since it uses the Redis instance already running for the Database. MQTT requires the additional MQTT Broker service to be running.