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

   _Claude Code on behalf of davsclaus_
   
   This group adds the catalog body types (CAMEL-24961) for thirteen network 
and RPC components: mina, mina-sftp, mllp, lumberjack, asterisk, grpc, thrift, 
avro, cometd, cometds, quickfix, jgroups and jgroups-raft. Each change is an 
`@BodyTypes` annotation on the Endpoint, plus the JSON it generates and the 
catalog copy. Three doc pages had their body text corrected.
   
   **What the catalog says now**
   
   | Component | Consumer | Reply of the consumer | Producer input | Producer 
output |
   |---|---|---|---|---|
   | mina | a String (the default object codec over TCP); `byte[]` over UDP; an 
`IoBuffer` with allowDefaultCodec=false | a String, or no body | a String; any 
body with textline; text, bytes, a stream or a file over UDP | the reply as a 
String; `byte[]` over UDP |
   | mina-sftp | as sftp: a `RemoteFile`, a stream with streamDownload, no body 
with download=false | | text, bytes, a stream or a file | unchanged |
   | mllp | the HL7 message as a String (`byte[]` with stringPayload=false) | 
`any`: the body is not sent; the acknowledgement comes from the 
CamelMllpAcknowledgement properties or autoAck | text or bytes | unchanged, 
with the acknowledgement in headers |
   | lumberjack | the JSON of each log event as Java objects, normally a Map | 
| | |
   | asterisk | a `ManagerEvent` | | `any`: the action and its arguments are 
headers | the `ManagerResponse` |
   | grpc | the protobuf request; a List with AGGREGATION; no body with 
forwardOnCompleted | the response message, or a List of them for a stream | a 
message or a List | a List by default; the message or a List with 
synchronous=true; unchanged with STREAMING |
   | thrift | a List of the arguments | converted to the return type of the 
method | a List of the arguments, or the one argument | `unknown`: the return 
type of the IDL |
   | avro | an `Object[]` of the parameters, or the parameter with 
singleParameter | the response type of the protocol, which is not converted | 
an `Object[]` or the single parameter | `unknown`: the response of the protocol 
|
   | cometd, cometds | the Bayeux data parsed from JSON: text, a value, a Map, 
a List | the same, with InOut | text, a value, a Map or a List | unchanged |
   | quickfix | a `quickfix.Message`, or no body for the session events | a 
Message, or FIX text or bytes, with InOut | a Message, or FIX text or bytes | 
unchanged, or the reply Message with InOut |
   | jgroups | `unknown`: what the peer serialized; `View` messages with 
enableViewMessages | | a Serializable body | unchanged |
   | jgroups-raft | no body: the role change events, with the role in a header 
| | bytes, text, a stream or a file | the result of the state machine as 
`byte[]` |
   
   **Checked at runtime.** Throwaway tests, not part of the PR, sent text, 
bytes, a stream, a file, a Map, a POJO, a number and no body. Every call stayed 
local. The setups:
   - **Local sockets:** mina (TCP, UDP, textline, the object codec), mllp, and 
a lumberjack client.
   - **Embedded servers:** Apache SSHD for mina-sftp, a fake AMI server, and 
the in-process quickfix acceptor and initiator.
   - **RPC:** the gRPC, Thrift and Avro servers in netty, with the Camel 
consumers.
   - **cometd:** the embedded Jetty CometD server, with a Bayeux client.
   - **jgroups:** local JGroups and jgroups-raft channels.
   
   Not run: cometds over TLS, the avro http transport, the jgroups-raft 
FOLLOWER event, and the asterisk error answer.
   
   **Choices**
   - mina does not copy netty. Its default TCP codec is Java object 
serialization, so only a String gets through unless `objectCodecPattern` lists 
more classes, and the descriptions say so.
   - mina-sftp copies the body types of sftp on main.
   - thrift and avro give `unknown` outputs, as the IDL or the protocol decides 
the class.
   
   **Doc fixes**
   - **mllp:** the page said the component uses `byte[]` payloads. By default 
the consumer gives a String.
   - **quickfix:** the correlation predicate is not reversed. It is the session 
as the replier sees it, and it is required for InOut.
   - **avro:** in the singleParameter example, get receives the `Key`, and put 
an array of the `Key` and the `Value`.
   
   PRs #28214, #28373 (camel-mina-sftp), #28360 (camel-avro-rpc) and #28378 
(camel-quickfix) change code of these modules, but not their Endpoint classes 
or generated files.
   
   **Bugs found, not fixed here.** The JIRAs, one per component, will follow.
   - **quickfix:**
     - An InOut consumer replies to every event, so messages the route does not 
answer are echoed back. The reply to the Logon re-sends the Logon until a 
StackOverflowError. The example of the page is affected.
     - An InOut reply that does not convert fails inside fromApp. The sequence 
does not move on, so the counterparty asks for resends without end.
     - An InOut producer without CorrelationCriteria leaves a rule with a null 
predicate, and every later engine event fails with a NullPointerException.
     - A producer body that does not convert fails with a bare "message is 
null".
   - **mina:**
     - With sync=false and InOut, the body and the headers are lost after the 
producer, as `getOut()` creates an empty message.
     - A textline reply is not type converted, so bytes are written as `[B@…`.
     - The consumer ignores sync=false and always replies.
   - **mllp:** a body that is not a String or bytes is sent as an empty 
message, and the producer then times out waiting for the acknowledgement.
   - **asterisk:** QUEUE_STATUS and SIP_PEERS give only the first response, as 
the events that follow are not collected.
   - **grpc:** a reply is not checked against the response type of the method. 
A request body left as the reply was decoded by the client as a response.
   - **thrift:**
     - On the async server, a reply that does not convert gives the client a 
null result or "unknown result", with no error.
     - On the sync server, a null reply for an i32 method sends 0.
   - **cometd:**
     - A stream is published as its toString, and a File as its path.
     - No body publishes nothing, with no error.
   - **jgroups-raft:**
     - A Map, a number or a POJO body is skipped, with no error.
     - A List fails with a misleading conversion error.
     - raftId and channelProperties work as endpoint parameters, but are only 
component options in the catalog.
   - **jgroups:** a stream body fails with NotSerializableException, with no 
hint to convert it.
   
   **Local checks**
   - The changed modules build, with no change to the generated files after the 
build.
   - The catalog copies equal their modules.
   - camel-catalog, camel-yaml-dsl-validator and camel-jbang-core tests pass.
   - The Endpoint and Component DSLs regenerate with no change.
   
   🤖 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