davsclaus opened a new pull request, #29936:
URL: https://github.com/apache/camel/pull/29936

   Part of item 4 of 
[CAMEL-26929](https://issues.apache.org/jira/browse/CAMEL-26929): `camel cmd 
receive`.
   
   ## Problems and changes
   
   - **`--since` never filtered.** The receive console recorded the message 
timestamp, which is 0 for most components, and the CLI keeps a message without 
a timestamp. `ReceiveDevConsole` (camel-console) now records the time the 
exchange was created when the message has no timestamp.
   - **`--action=stop` said "Starting to receive messages ...".** It says 
"Stopping to receive messages ...".
   - **The JSON stream of `--output=json` started with "Starting to receive 
..." on stdout.** With `--output=json`, that line goes to stderr, so stdout has 
only the JSON.
   - **`--action=status --output=json` printed the table.** It prints a JSON 
list: `pid` (a number), `name`, `uptime`, `enabled`, `total`, `firstTimestamp` 
and `lastTimestamp` (when known), and `endpoint` (masked with `--mask`, as in 
the table).
   - **A start with an endpoint that matches nothing exited 0.** The 
integration answers with the URL of the endpoint it receives from; without one, 
the CLI prints "No endpoint matching: <pattern>" on stderr and exits 3. Older 
Camel versions answer the same way, so this works against them too.
   
   The 4.24 upgrade guide has a line in the exit codes entry.
   
   ## Tests
   
   - 
`ReceiveDevConsoleTest.testAMessageWithoutTimestampHasTheTimeItWasReceived` 
(camel-console, a real `direct` endpoint): the timestamp is the time of the 
send. It was 0 without the change.
   - `CamelReceiveActionTest`: stop says "Stopping"; `--endpoint=nope*` that 
the integration finds nothing for exits 3; `--endpoint=... --output=json` has 
only JSON lines on stdout and the start line on stderr; `--action=status 
--output=json` is a list with the pid as a number and the password masked. 
`endpointStartsReceivingAndDumpsTheMessages` now answers with a URL, as the 
integration does.
   - camel-console: 292 pass. camel-jbang-run: 303. camel-jbang-core: 3005 + 
259 pass.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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