update
This commit is contained in:
@@ -388,6 +388,12 @@ graph TD
|
||||
- **Julia:** Uses `NATS_connection` keyword parameter with function overloading
|
||||
- **JavaScript/Python:** Achieved by creating NATS client outside the function and reusing it in custom handlers
|
||||
|
||||
**Note on `is_publish`:**
|
||||
- `is_publish` is simply a switch to control automatic publishing
|
||||
- When `true` (default): Message is published to NATS automatically
|
||||
- When `false`: Returns `(env, env_json_str)` without publishing, allowing manual publishing
|
||||
- Connection reuse is achieved separately by creating NATS client outside the function
|
||||
|
||||
### Julia Implementation
|
||||
|
||||
#### Dependencies
|
||||
|
||||
@@ -338,6 +338,7 @@ node test/scenario3_julia_to_julia.js
|
||||
**Why the Difference?**
|
||||
- Julia supports function overloading and keyword arguments, allowing `NATS_connection` to be passed as an optional parameter
|
||||
- JavaScript/Python use a simpler `is_publish` option to control automatic publishing
|
||||
- `is_publish` is simply a switch: when `true`, publish automatically; when `false`, return `(env, env_json_str)` without publishing
|
||||
- For connection reuse in JavaScript/Python, create a NATS client once and reuse it in your custom `fileserver_upload_handler` or custom publish logic
|
||||
|
||||
## Usage
|
||||
|
||||
Reference in New Issue
Block a user