update readme

This commit is contained in:
2026-05-23 10:57:01 +07:00
parent 31727f3337
commit 15a7f1c178
3 changed files with 12 additions and 9 deletions

View File

@@ -9,7 +9,7 @@
using NATS, JSON, UUIDs, Dates, PrettyPrinting, DataFrames, Arrow, HTTP, Base64
# Include the bridge module
include("../src/msghandler.jl")
include("/home/ton/docker-apps/sommpanion/msghandler/src/msghandler.jl")
using .msghandler
# Configuration
@@ -39,7 +39,7 @@ function test_mix_receive()
# Use msghandler.smartunpack to handle the data
# API: smartunpack(msg, download_handler; max_retries, base_delay, max_delay)
result = msghandler.smartunpack(
msg;
env_json_str;
max_retries = 5,
base_delay = 100,
max_delay = 5000

View File

@@ -14,7 +14,7 @@
using NATS, JSON, UUIDs, Dates, PrettyPrinting, DataFrames, Arrow, HTTP, Base64
# Include the bridge module
include("../src/msghandler.jl")
include("/home/ton/docker-apps/sommpanion/msghandler/src/msghandler.jl")
using .msghandler
# Configuration
@@ -204,7 +204,7 @@ function test_mix_send()
]
# Use smartpack with mixed content
sendinfo = msghandler.smartpack(
env, env_json_str = msghandler.smartpack(
SUBJECT,
payloads; # List of (dataname, data, type) tuples
broker_url = NATS_URL,
@@ -218,10 +218,8 @@ function test_mix_send()
receiver_id = "",
reply_to = "",
reply_to_msg_id = "",
is_publish = true # Publish the message to NATS
)
env, env_json_str = sendinfo
log_trace("Sent message with $(length(env.payloads)) payloads")
# Log transport type for each payload
@@ -243,6 +241,8 @@ function test_mix_send()
link_count = count(p -> p.transport == "link", env.payloads)
log_trace("Direct transport: $direct_count payloads")
log_trace("Link transport: $link_count payloads")
return env_json_str
end
@@ -252,7 +252,7 @@ println("Correlation ID: $correlation_id")
# Run sender
println("start smartpack for mixed content")
test_mix_send()
env_json_str = test_mix_send()
println("\nTest completed.")
println("Note: Run test_julia_to_julia_mix_receiver.jl to receive the messages.")