[
https://issues.apache.org/jira/browse/CAMEL-22702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039345#comment-18039345
]
Claus Ibsen commented on CAMEL-22702:
-------------------------------------
Something ala
{code:java}
{
"messages": [
{
"message": {
"exchangeType": "org.apache.camel.support.DefaultExchange",
"messageType": "org.apache.camel.support.DefaultMessage",
"body": {
"type": "java.lang.String",
"value": "Hello Camel from route1"
}
},
"uid": 20,
"endpointUri": "seda:\/\/cheese",
"remoteEndpoint": false,
"timestamp": 0
}
]
} {code}
> Add structured output option for Camel JBang cmd receive
> --------------------------------------------------------
>
> Key: CAMEL-22702
> URL: https://issues.apache.org/jira/browse/CAMEL-22702
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Reporter: Christoph Deppisch
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.17.0
>
>
> It would be good to produce structured output for the Camel JBang cmd receive
> command. I am thinking of something like
> {code:java}
> camel cmd receive my-route --endpoint kafka:inbox --output json{code}
> The output is a Json array of already received messages on this endpoint
> (according to the --tail option)
> The receive command is waiting for new messages to arrive and each message
> will be printed in a structured Json output like this:
> {noformat}
> [
> { "message": 1, "endpoint": "kafka://info", "body": "Hello Camel"},
> { "message": 2, "endpoint": "kafka://info", "body": "Hi Camel"}
> ]
> Waiting for new messages ...
> {
> "message": 3,
> "endpoint": "kafka://info",
> "body": "Howdy Camel"
> }{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)