update
This commit is contained in:
@@ -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
|
5. For link transport: fetches data from URL with exponential backoff, then deserializes
|
||||||
|
|
||||||
# Arguments:
|
# 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:
|
# Keyword Arguments:
|
||||||
- `fileserver_download_handler::Function = _fetch_with_backoff` - Function to handle downloading data from file server URLs
|
- `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
|
```jldoctest
|
||||||
# Receive and process message
|
# Receive and process message
|
||||||
msg = nats_message # NATS 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"), ...]
|
# env["payloads"] = [("dataname1", data1, "type1"), ("dataname2", data2, "type2"), ...]
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user