davsclaus opened a new pull request, #3386:
URL: https://github.com/apache/camel-kamelets/pull/3386
_Claude Code on behalf of Claus Ibsen_
Follow-up to #3379 (the new `websocket-source`), now that two Camel fixes
for the `vertx-websocket` client consumer are merged for 4.24:
- **CAMEL-27481** (apache/camel#30687): the messages are routed one after
the other, in the order the server sent them. Before, they were routed in
parallel and in any order.
- **CAMEL-27484** (apache/camel#30690): `connectMessage`, sent when the
consumer connects and after each reconnect.
### Changes
- New option `connectMessage`: a text message, such as a subscribe request,
sent each time the source connects (at start and after each reconnect). It is
passed as `RAW({{?connectMessage}})`. Without `RAW()`, a JSON subscribe request
breaks the endpoint URI (`URLDecoder: Illegal hex characters`). When the option
is not set, nothing is sent: I checked that the server gets only the OPEN event.
- Description: the messages go on in the order the server sent them;
`connectMessage` covers servers that push only after a subscribe. The "it only
receives / cannot send a subscribe request" text is removed.
### Tests
New `websocket-source-subscribe-test`. Its server sends nothing until the
client sends a message:
- the `connectMessage` reaches the server exactly as written, with `+`, `&`
and `%`;
- 10 messages pushed at once go on in order (`0,1,…,9`);
- after the server restarts, the source sends the `connectMessage` again and
gets the 10 messages again.
With `parallelProcessing: true` added to the template for a check run, the
test fails (`5,1,3,9,7,4,6,0,8,2`), so it does catch messages out of order.
`WebSocketIT` passes 4/4 locally against a Camel build that includes both
fixes. `./mvnw clean install` passes.
Still open in Camel: CAMEL-27482 (apache/camel#30688), so that a `RAW()`
query value in `url` reaches the server as written. The `url` description will
be updated in a follow-up once it is merged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
--
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]