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
|
log_trace(env.correlation_id, "Direct transport - decoding payload") # Log direct transport handling
|
||||||
|
|
||||||
# Decode Base64 payload
|
# 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
|
# Deserialize based on type
|
||||||
data = _deserialize_data(payload_bytes, env.type, env.correlation_id, env.metadata) # Convert bytes to Julia data
|
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
|
# Use NATSBridge.smartreceive to handle the data
|
||||||
result = NATSBridge.smartreceive(msg)
|
result = NATSBridge.smartreceive(msg)
|
||||||
println("envelope----- ", result.envelope)
|
# println("envelope----- ", result.envelope)
|
||||||
# Check transport type
|
# Check transport type
|
||||||
if result.envelope.transport == "direct"
|
if result.envelope.transport == "direct"
|
||||||
log_trace("Received direct transport with ---- bytes")
|
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")
|
log_trace("Received $(file_size) bytes of binary data")
|
||||||
|
|
||||||
# Save received data to a test file
|
# Save received data to a test file
|
||||||
|
#[WORKING] add dataname so I know it is a file
|
||||||
filename = basename(result.envelope.url)
|
filename = basename(result.envelope.url)
|
||||||
output_path = "./new_$filename"
|
output_path = "./new_$filename"
|
||||||
write(output_path, result.data)
|
write(output_path, result.data)
|
||||||
@@ -111,9 +112,9 @@ println("Starting large binary payload test...")
|
|||||||
println("Correlation ID: $correlation_id")
|
println("Correlation ID: $correlation_id")
|
||||||
println("Large file: $LARGE_FILE_PATH")
|
println("Large file: $LARGE_FILE_PATH")
|
||||||
|
|
||||||
# Run sender first
|
# # Run sender first
|
||||||
println("start smartsend")
|
# println("start smartsend")
|
||||||
test_large_binary_send()
|
# test_large_binary_send()
|
||||||
|
|
||||||
# Run receiver
|
# Run receiver
|
||||||
println("testing smartreceive")
|
println("testing smartreceive")
|
||||||
|
|||||||
Reference in New Issue
Block a user