update
This commit is contained in:
@@ -392,9 +392,9 @@ function smartsend(
|
||||
```
|
||||
|
||||
**Return Value:**
|
||||
- Returns a tuple `(env, msg_json_str)` where:
|
||||
- Returns a tuple `(env, env_json_str)` where:
|
||||
- `env::msgEnvelope_v1` - The envelope object containing all metadata and payloads
|
||||
- `msg_json_str::String` - JSON string representation of the envelope for publishing
|
||||
- `env_json_str::String` - JSON string representation of the envelope for publishing
|
||||
|
||||
**Options:**
|
||||
- `is_publish::Bool = true` - When `true` (default), the message is automatically published to NATS. When `false`, the function returns the envelope and JSON string without publishing, allowing manual publishing via NATS request-reply pattern.
|
||||
|
||||
@@ -151,9 +151,9 @@ All three implementations (Julia, JavaScript, Python/Micropython) follow the sam
|
||||
The `smartsend` function now returns a tuple containing both the envelope object and the JSON string representation:
|
||||
|
||||
```julia
|
||||
env, msg_json_str = smartsend(...)
|
||||
env, env_json_str = smartsend(...)
|
||||
# env::msgEnvelope_v1 - The envelope object with all metadata and payloads
|
||||
# msg_json_str::String - JSON string for publishing to NATS
|
||||
# env_json_str::String - JSON string for publishing to NATS
|
||||
```
|
||||
|
||||
**Options:**
|
||||
@@ -360,9 +360,9 @@ df = DataFrame(
|
||||
)
|
||||
|
||||
# Send via SmartSend - wrapped in a list (type is part of each tuple)
|
||||
env, msg_json_str = SmartSend("analysis_results", [("table_data", df, "table")])
|
||||
env, env_json_str = SmartSend("analysis_results", [("table_data", df, "table")])
|
||||
# env: msgEnvelope_v1 object with all metadata and payloads
|
||||
# msg_json_str: JSON string representation of the envelope for publishing
|
||||
# env_json_str: JSON string representation of the envelope for publishing
|
||||
```
|
||||
|
||||
#### JavaScript (Receiver)
|
||||
|
||||
Reference in New Issue
Block a user