JinyuChen97 commented on issue #8280:
URL: https://github.com/apache/camel-quarkus/issues/8280#issuecomment-4842636992

   Hi @jamesnetherton 
   
   I summaried 3 different case tests here:
   
   **1. Testing create 1 connection and send 2 message by client, route 3 
defined sendToAll=true, route3 ws producer share the same connection with ws 
consumer in route1**
   
   // Route 1: WebSocket Consumer - receives messages from client
   from("vertx-websocket:/span-link-test")
           .routeId("websocket-consumer")
           .to("direct:logMessage");
   
   // Route 2: Log the message
   from("direct:logMessage")
           .routeId("log-message")
           .log("Greeting: ${body}");
   
   // Route 3: Timer Producer - sends messages to WebSocket clients (with 
sendToAll=true)
   from("timer:websocket-timer?period=5000&repeatCount=1")
           .routeId("timer-producer")
           .setBody().constant("Hello World")
           .to("vertx-websocket:/span-link-test?sendToAll=true");
   
   4 traces total:
   <img width="1282" height="499" alt="Image" 
src="https://github.com/user-attachments/assets/27882649-8393-4617-9af0-26f2f6d4b670";
 />
   
   Http upgrade request
   <img width="1725" height="336" alt="Image" 
src="https://github.com/user-attachments/assets/46881f14-fe9a-48db-8e93-a877191cf147";
 />
   
   First message tracing received from client:
   <img width="3432" height="1508" alt="Image" 
src="https://github.com/user-attachments/assets/990179c5-7a22-4865-89ab-5095f473c989";
 />
   
   Second message tracing received from client:
   <img width="1716" height="754" alt="Image" 
src="https://github.com/user-attachments/assets/d4effa0b-4b37-43a3-a8a3-65b49fa77421";
 />
   
   Timer->ws Producer
   <img width="1716" height="754" alt="Image" 
src="https://github.com/user-attachments/assets/73fec13c-9bdb-4f45-aa32-802434ace977";
 />
   
   
   **2. Testing create 1 connection and send 2 message by client, no 
sendToAll=true defined, route3 ws producer create a new connection**
   
   // Route 1: WebSocket Consumer - receives messages from client
   from("vertx-websocket:/span-link-test")
           .routeId("websocket-consumer")
           .to("direct:logMessage");
   
   // Route 2: Log the message
   from("direct:logMessage")
           .routeId("log-message")
           .log("Greeting: ${body}");
   
   // Route 3: Timer Producer - sends messages to WebSocket clients (with 
sendToAll=true)
   from("timer:websocket-timer?period=5000&repeatCount=1")
           .routeId("timer-producer")
           .setBody().constant("Hello World")
           .to("vertx-websocket:/span-link-test");
   
   6 tracing total:
   <img width="2576" height="1340" alt="Image" 
src="https://github.com/user-attachments/assets/cc605fa1-8ee3-4f12-815c-2e1d148efe7c";
 />
   
   There are 2 GET /span-link-test here because of route 3 created a new 
connection and a new http upgrade request generated
   Fb8931b follows from c98d7f8, showing timer -> producer with message ‘Hello 
World’ in a different tracing
   <img width="3446" height="642" alt="Image" 
src="https://github.com/user-attachments/assets/8e16dadb-7ec4-4704-8559-8df034b96e57";
 />
   
   <img width="1722" height="933" alt="Image" 
src="https://github.com/user-attachments/assets/a288ea01-cdde-4462-8006-292318d11ee4";
 />
   
   No follows from in timer -> producer when sendtoall=false (**_should this be 
fixed and align with the case when sendtoall=true?_**)
   <img width="1727" height="496" alt="Image" 
src="https://github.com/user-attachments/assets/a685f8a6-991b-4901-8de0-c79b7ed228ad";
 />
   
   
The rest 433aa6d and a9ec7b2 are triggered by 2 messages sent from client 
and follows from a268293 (same as the screenshot when sentoall=true, so will 
not be attached here.)
   
   **3. Testing create 2 connections and send 1 message to one of the 
connections by client, sendToAll=true defined.**
   
   // Route 1: WebSocket Consumer - receives messages from client
   from("vertx-websocket:/span-link-test")
           .routeId("websocket-consumer")
           .to("direct:logMessage");
   
   // Route 2: Log the message
   from("direct:logMessage")
           .routeId("log-message")
           .log("Greeting: ${body}");
   
   // Route 3: Timer Producer - sends messages to WebSocket clients (with 
sendToAll=true)
   from("timer:websocket-timer?period=5000&repeatCount=1")
           .routeId("timer-producer")
           .setBody().constant("Hello World")
           .to("vertx-websocket:/span-link-test?sentToAll=true”);
   
   4 tracing total:
   2 http upgrade requests by 2 web socket connection built
   <img width="1279" height="455" alt="Image" 
src="https://github.com/user-attachments/assets/1aeeef7a-e25e-47e8-b262-f62c0763ef85";
 />
   
   Vertxwebsocket consumer received 1 message from one of the connections
   <img width="3452" height="674" alt="Image" 
src="https://github.com/user-attachments/assets/536987f1-deaf-4240-a4b1-7ffb885e892e";
 />
   <img width="3446" height="1432" alt="Image" 
src="https://github.com/user-attachments/assets/2b55397b-9cd3-4a04-9856-765fc78c0fa7";
 />
   
   timer -> producer has referred to 2 http upgrade request spans as 
sentToAll=true defined:
   <img width="1725" height="700" alt="Image" 
src="https://github.com/user-attachments/assets/30d841f2-4248-46e1-8415-2e6e3455864c";
 />
   
   please correct me if you think something wrong. thanks
   
   Best regards,
   Jinyu
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to