minor fix

This commit is contained in:
2026-03-04 10:02:31 +07:00
parent 1dfa277279
commit ee2d2c7238
5 changed files with 43 additions and 25 deletions

View File

@@ -196,7 +196,7 @@ env, env_json_str = NATSBridge.smartsend(
fileserver_url = "http://localhost:8080",
fileserver_upload_handler::Function = plik_oneshot_upload,
size_threshold::Int = 1_000_000,
correlation_id::Union{String, Nothing} = nothing,
correlation_id::String = string(uuid4()), # Correlation ID for tracing (auto-generated UUID)
msg_purpose::String = "chat",
sender_name::String = "NATSBridge",
receiver_name::String = "",
@@ -204,7 +204,9 @@ env, env_json_str = NATSBridge.smartsend(
reply_to::String = "",
reply_to_msg_id::String = "",
is_publish::Bool = true, # Whether to automatically publish to NATS
NATS_connection::Union{NATS.Connection, Nothing} = nothing # Pre-existing NATS connection (optional, saves connection overhead)
NATS_connection::Union{NATS.Connection, Nothing} = nothing, # Pre-existing NATS connection (optional, saves connection overhead)
msg_id::String = string(uuid4()), # Message ID (auto-generated UUID)
sender_id::String = string(uuid4()) # Sender ID (auto-generated UUID)
)
# Returns: (msgEnvelope_v1, JSON string)
# - env: msgEnvelope_v1 object with all envelope metadata and payloads