diff --git a/src/NATSBridge.jl b/src/NATSBridge.jl index ae65770..26ea775 100644 --- a/src/NATSBridge.jl +++ b/src/NATSBridge.jl @@ -783,7 +783,7 @@ A HTTP file server is required along with its download function. 5. For link transport: fetches data from URL with exponential backoff, then deserializes # Arguments: - - `msg::NATS.Msg` - NATS message to process + - `msg_json_str::String` - JSON string from NATS message payload (e.g., `String(nats_msg.payload)`) # Keyword Arguments: - `fileserver_download_handler::Function = _fetch_with_backoff` - Function to handle downloading data from file server URLs @@ -798,7 +798,8 @@ A HTTP file server is required along with its download function. ```jldoctest # Receive and process message msg = nats_message # NATS message -env = smartreceive(msg; fileserver_download_handler=_fetch_with_backoff, max_retries=5, base_delay=100, max_delay=5000) +msg_json_str = String(msg.payload) +env = smartreceive(msg_json_str; fileserver_download_handler=_fetch_with_backoff, max_retries=5, base_delay=100, max_delay=5000) # env["payloads"] = [("dataname1", data1, "type1"), ("dataname2", data2, "type2"), ...] ``` """