update
This commit is contained in:
@@ -66,17 +66,16 @@ function test_large_binary_receive()
|
||||
conn = NATS.connect(NATS_URL)
|
||||
NATS.subscribe(conn, SUBJECT) do msg
|
||||
log_trace("Received message on $(msg.subject)")
|
||||
log_trace("Received message:\n$msg")
|
||||
|
||||
# Use SmartReceive to handle the data
|
||||
result = SmartReceive(msg)
|
||||
|
||||
# Use NATSBridge.smartreceive to handle the data
|
||||
result = NATSBridge.smartreceive(msg)
|
||||
println("envelope----- ", result.envelope)
|
||||
# Check transport type
|
||||
if result.envelope.transport == "direct"
|
||||
log_trace("Received direct transport with $(length(result.data)) bytes")
|
||||
log_trace("Received direct transport with ---- bytes")
|
||||
else
|
||||
# For link transport, result.data is the URL
|
||||
log_trace("Received link transport at $(result.data)")
|
||||
log_trace("Received link transport at ---")
|
||||
end
|
||||
|
||||
# Verify the received data matches the original
|
||||
@@ -100,9 +99,9 @@ function test_large_binary_receive()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# Keep listening for 10 seconds
|
||||
sleep(10)
|
||||
sleep(60)
|
||||
NATS.drain(conn)
|
||||
end
|
||||
|
||||
@@ -111,12 +110,28 @@ println("Starting large binary payload test...")
|
||||
println("Correlation ID: $correlation_id")
|
||||
println("Large file: $LARGE_FILE_PATH")
|
||||
|
||||
# Run sender first
|
||||
println("start smartsend")
|
||||
test_large_binary_send()
|
||||
# # Run sender first
|
||||
# println("start smartsend")
|
||||
# test_large_binary_send()
|
||||
|
||||
# Run receiver
|
||||
println("testing smartreceive")
|
||||
test_large_binary_receive()
|
||||
|
||||
println("Test completed.")
|
||||
println("Test completed.")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user