v0.6.0-dev-seperate_natsclient_smartsend #13

Merged
ton merged 7 commits from v0.6.0-dev-seperate_natsclient_smartsend into v0.6.0-dev 2026-05-14 06:21:29 +00:00
Showing only changes of commit 60ae464ea2 - Show all commits

View File

@@ -803,14 +803,15 @@ env = smartreceive(msg; fileserver_download_handler=_fetch_with_backoff, max_ret
``` ```
""" """
function smartreceive( function smartreceive(
msg::NATS.Msg; msg_json_str::String; # get it from String(nats_msg.payload)
fileserver_download_handler::Function = _fetch_with_backoff, fileserver_download_handler::Function = _fetch_with_backoff,
max_retries::Int = 5, max_retries::Int = 5,
base_delay::Int = 100, base_delay::Int = 100,
max_delay::Int = 5000 max_delay::Int = 5000
)::JSON.Object{String, Any} )::JSON.Object{String, Any}
# Parse the JSON envelope # Parse the JSON envelope
env_json_obj = JSON.parse(String(msg.payload)) env_json_obj = JSON.parse(msg_json_str)
log_trace(env_json_obj["correlation_id"], "Processing received message") # Log message processing start log_trace(env_json_obj["correlation_id"], "Processing received message") # Log message processing start
# Process all payloads in the envelope # Process all payloads in the envelope