v0.6.0-dev-seperate_natsclient_smartsend #13
@@ -803,14 +803,15 @@ env = smartreceive(msg; fileserver_download_handler=_fetch_with_backoff, max_ret
|
||||
```
|
||||
"""
|
||||
function smartreceive(
|
||||
msg::NATS.Msg;
|
||||
msg_json_str::String; # get it from String(nats_msg.payload)
|
||||
fileserver_download_handler::Function = _fetch_with_backoff,
|
||||
max_retries::Int = 5,
|
||||
base_delay::Int = 100,
|
||||
max_delay::Int = 5000
|
||||
)::JSON.Object{String, Any}
|
||||
|
||||
# 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
|
||||
|
||||
# Process all payloads in the envelope
|
||||
|
||||
Reference in New Issue
Block a user