3 ms·
Not clear for me if I can `push` messages from my backend to client? At lest for me this is a killer feature.
by rafaelturk 4y ago
Not clear for me if I can `push` messages from my backend to client? At lest for me this is a killer feature.
- elithrar 4y agoIn the MQTT world, in which Pub/Sub is based, every publisher is a client, and every subscriber is a client. You can be both, too! Assuming your existing backend is in $SOME_CLOUD_PROVIDER, publishing messages to Pub/Sub is just a few lines of code in your favorite language - we have a couple of examples up in JS + Rust - e.g. https://developers.cloudflare.com/pub-sub/examples/connect-javascript/ https://developers.cloudflare.com/pub-sub/examples/connect-j... Subscribers receiving those messages can be anywhere you can run an MQTT client, which turns out to be... a lot of places :-) (I'm the PM for this, and we'll be adding more examples to our docs in the coming weeks)