From 042c8454d59b8c9f85ee2e23f70744f2314f20be Mon Sep 17 00:00:00 2001 From: niten Date: Sun, 8 Jun 2025 09:46:21 -0700 Subject: [PATCH] refactor: Remove deprecated MQTT client creation functions and update definitions --- src/milquetoast/core.clj | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/milquetoast/core.clj b/src/milquetoast/core.clj index 7ee4d12..7eb3478 100644 --- a/src/milquetoast/core.clj +++ b/src/milquetoast/core.clj @@ -7,12 +7,6 @@ (:import [org.eclipse.paho.client.mqttv3 MqttClient MqttConnectOptions MqttMessage IMqttMessageListener] org.eclipse.paho.client.mqttv3.persist.MemoryPersistence)) -(defdeprecated create-mqtt-client! - [& {:keys [broker-uri username password] - :or {username nil - password nil}}] - (api/connect! :host broker-uri :username username :password password)) - (defn- retry-attempt "Attempts to execute function `f`. If `f` throws a RuntimeException, logs the exception and attempts to reconnect before retrying `f`." [verbose f reconnect] @@ -127,12 +121,12 @@ msg nil))) -(defdeprecated create-client +(defn create-client [broker-uri username password & {:keys [verbose] :or {verbose false}}] - (api/connect! :host broker-uri :username username :password password :verbose verbose)) + ...) -(defdeprecated create-json-client +(defn create-json-client [broker-uri username password & {:keys [verbose] :or {verbose false}}] - (api/connect-json! :host broker-uri :username username :password password :verbose verbose)) + ...)