Coder Social home page Coder Social logo

rumqtt's Introduction

NOTE: Archived. No further development under this repo.

Follow progress of a different implementation here

Build Status Documentation

Pure rust MQTT client which strives to be simple, robust and performant. This library takes an opinionated approach of spawning an eventloop thread where all the mqtt related network io happens. The eventloop takes care of necessary robustness tasks without user having to rethink of all the necessary stuff to implement

Client APIs will communicate with the eventloop over a channel. Check the documentation for possible client operations

FEATURES


Asynchronous

Asynchronous. New publishs/subscriptions doesn't have to wait for the ack of the previous message before sending the next message. Much faster when compared to synchronous calls

Backpressure based on inflight queue length slow networks

Outgoing and incoming streams operating concurrently doesn't mean internal mqtt state buffers grow indefinitely consuming memory. When the inflight message limit is hit, the eventloop stops processing new user requests until inflight queue limit is back to normal and the backpressure will propagate to client calls.

The same is true for slow networks. The channel buffer will nicely smoothen latency spikes but a prolonged bad network will be detected through backpressure.

Throttling

A lot of managed brokers will allow messages only at a certain rate. Any spikes and the broker might disconnect the client. Throttling limit will make sure that this doesn't happen. This is true even for retransmission of internal unacked messages during reconnections.

Automatic reconnections

All the intermittent disconnections are handled with automatic reconnections. But the control to do or not do this is with the user

Miscellaneous

  • On-demand disconnection and reconnections
  • Inbuilt JWT auth for SAAS brokers like GCP iotcore
  • Tls using RustTLS. Cross compilation and multi platform support is painless
  • Automatic resubscription. Not usually necessary when clean_session=false but might help when opensource brokers crash before saving the state

What's not supported

  • Cancelling mqtt will with disconnect packet

rumqtt's People

Contributors

creativcoder avatar rschifflin avatar denvera avatar vorot93 avatar flxo avatar jamesmunns avatar mojzu avatar sanchayanmaity avatar thebestjohn avatar totalkrill avatar artemgr avatar bbigras avatar gabisurita avatar leoniloris avatar bwolf avatar liurnd avatar wmanley avatar eldesh avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.