update
This commit is contained in:
Binary file not shown.
@@ -354,7 +354,7 @@ function smartreceive(
|
||||
log_trace(env.correlation_id, "Direct transport - decoding payload") # Log direct transport handling
|
||||
|
||||
# Decode Base64 payload
|
||||
payload_bytes = Base64.decode(env.payload) # Decode base64 payload to bytes
|
||||
payload_bytes = Base64.base64decode(env.payload) # Decode base64 payload to bytes
|
||||
|
||||
# Deserialize based on type
|
||||
data = _deserialize_data(payload_bytes, env.type, env.correlation_id, env.metadata) # Convert bytes to Julia data
|
||||
|
||||
@@ -69,7 +69,7 @@ function test_large_binary_receive()
|
||||
|
||||
# Use NATSBridge.smartreceive to handle the data
|
||||
result = NATSBridge.smartreceive(msg)
|
||||
println("envelope----- ", result.envelope)
|
||||
# println("envelope----- ", result.envelope)
|
||||
# Check transport type
|
||||
if result.envelope.transport == "direct"
|
||||
log_trace("Received direct transport with ---- bytes")
|
||||
@@ -85,6 +85,7 @@ function test_large_binary_receive()
|
||||
log_trace("Received $(file_size) bytes of binary data")
|
||||
|
||||
# Save received data to a test file
|
||||
#[WORKING] add dataname so I know it is a file
|
||||
filename = basename(result.envelope.url)
|
||||
output_path = "./new_$filename"
|
||||
write(output_path, result.data)
|
||||
@@ -111,9 +112,9 @@ 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")
|
||||
|
||||
Reference in New Issue
Block a user