net-mqtt-rpc-0.1.0.0: Make RPC calls via an MQTT broker.

Safe HaskellNone
LanguageHaskell2010

Network.MQTT.RPC

Synopsis

Documentation

call :: MQTTClient -> Topic -> ByteString -> IO ByteString Source #

Send a message to a topic on an MQTT broker with a random subscription and correlation such that an agent may receive this message and respond over the ephemeral channel. The response will be returned.

Note that this client provides no timeouts or retries. MQTT will guarantee the request message is delivered to the broker, but if there's nothing to pick it up, there may never be a response.