(defenumlookups enum from-name to-name)A helper macro that builds lookup functions for enums.
all values of enum are turned into a map of keywords to enum values.
This macro provides two functions: one named from-name->to-name
and one named to-name->from-name, for example:
(defenumlookups AWSIotQos kw qos) creates
(defn- kw->qos [kw]) which takes a keyword and returns an enum value, and
(defn- qos->kw [e]) which takes an enum value and returns a keyword.
A helper macro that builds lookup functions for enums. all values of `enum` are turned into a map of keywords to enum values. This macro provides two functions: one named `from-name->to-name` and one named `to-name->from-name`, for example: `(defenumlookups AWSIotQos kw qos)` creates `(defn- kw->qos [kw])` which takes a keyword and returns an enum value, and `(defn- qos->kw [e])` which takes an enum value and returns a keyword.
(get-base-retry-delay client)(get-client-endpoint client)(get-client-id client)(get-connection client)(get-connection-status client)(get-connection-timeout client)(get-connection-type client)(get-devices client)(get-execution-service client)(get-keep-alive-interval client)(get-max-connection-retries client)(get-max-offline-queue-size client)(get-max-retry-delay client)(get-num-of-client-threads client)(get-server-ack-timeout client)(get-subscriptions client)(get-will-message client)(mqtt-client authentication-method
{:keys [client-endpoint client-id keystore aws-access-key-id
aws-secret-access-key session-token key-password]
:as config})Returns an MQTT client, which handles connection to an MQTT endpoint authentication method can be either :tls or :wss :tls requires :client-endpoint, :client-id, :keystore, and :key-password :wss requires :client-id, :aws-access-key-id, and optionally :session-token
Returns an MQTT client, which handles connection to an MQTT endpoint authentication method can be either :tls or :wss :tls requires :client-endpoint, :client-id, :keystore, and :key-password :wss requires :client-id, :aws-access-key-id, and optionally :session-token
(publish-async client message)Given a client and a message, which is constructed by a publisher,
asynchronously publish that message
Given a `client` and a `message`, which is constructed by a publisher, asynchronously publish that message
(publish-blocking client topic payload)(publish-blocking client topic payload {:keys [qos timeout] :as opts})Given an MQTT client client, a string topic, and, optionally,
a keyword qos and a number timeout. Always returns the client
Given an MQTT client `client`, a string `topic`, and, optionally, a keyword `qos` and a number `timeout`. Always returns the client
(publisher on-success on-failure on-timeout)Takes three zero-arity functions, on-success, on-failure,
and on-timeout, and returns a function that takes a string topic,
keyword qos, and a string or byte array payload, this function can
in turn construct a message which can be passed to publish-async
Takes three zero-arity functions, `on-success`, `on-failure`, and `on-timeout`, and returns a function that takes a string `topic`, keyword `qos`, and a string or byte array `payload`, this function can in turn construct a message which can be passed to `publish-async`
(schedule-routine-task client f initial-delay period)(schedule-timeout-task client f timeout)(set-will-message client message)(subscribe client subscription)Applies a subscription to a client, firing the subscription's on-message
whenever a message is received to topic
Applies a subscription to a client, firing the subscription's `on-message` whenever a message is received to `topic`
(subscription topic qos on-message)Given a topic string, qos keyword, and
a 1-arity function that takes a message, returns a
subscription, which can be added to a client
Given a `topic` string, `qos` keyword, and a 1-arity function that takes a message, returns a subscription, which can be added to a client
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |