add dataname

This commit is contained in:
2026-02-10 16:14:27 +07:00
parent 5aab1d0c52
commit ebe049624a
2 changed files with 4 additions and 3 deletions

View File

@@ -191,7 +191,7 @@ function smartsend(
type = type,
transport = "direct",
payload = payload_b64,
metadata = Dict("content_length" => payload_size, "format" => "arrow_ipc_stream")
metadata = Dict("dataname" => dataname, "content_length" => payload_size, "format" => "arrow_ipc_stream")
)
msg_json = envelope_to_json(env) # Convert envelope to JSON

View File

@@ -71,10 +71,10 @@ function test_large_binary_receive()
result = NATSBridge.smartreceive(msg)
# Check transport type
if result.envelope.transport == "direct"
log_trace("Received direct transport with ---- bytes")
log_trace("Received direct transport")
else
# For link transport, result.data is the URL
log_trace("Received link transport at ---")
log_trace("Received link transport")
end
# Verify the received data matches the original
@@ -84,6 +84,7 @@ function test_large_binary_receive()
log_trace("Received $(file_size) bytes of binary data")
# Save received data to a test file
println("metadata ", result.envelope.metadata)
dataname = result.envelope.metadata["dataname"]
if dataname != "NA"
output_path = "./new_$dataname"