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

   Stacked on #28251. This is the cloud messaging group of the catalog body 
types (CAMEL-24961): aws2-sns, aws2-kinesis, aws2-kinesis-firehose, 
google-pubsub, azure-servicebus, azure-eventhubs and azure-storage-queue.
   
   **What the catalog says now**
   
   | Component | Consumer | Producer input | Producer output |
   |---|---|---|---|
   | aws2-sns | (producer only) | `text`, `bytes`, `stream` or `file`, sent as 
text; with batchEnabled=true a `list` of PublishBatchRequestEntry | 
`unchanged`; the PublishBatchResponse for a batch |
   | aws2-kinesis | `bytes`; a ByteBuffer with useKclConsumers=true | `text`, 
`bytes`, `stream` or `file`; a `list` is a batch | `unchanged` |
   | aws2-kinesis-firehose | (producer only) | the record without an operation; 
the SDK request per operation | `unchanged` after a send; the SDK response per 
operation |
   | google-pubsub | `bytes` | `text` or `bytes` | `unchanged` |
   | azure-servicebus | an Azure BinaryData (`pojo`) | `text`, `bytes`, 
`stream` or `file`, sent as text; a `list` is one message per element | 
`unchanged` |
   | azure-eventhubs | `bytes` | `text`, `bytes`, `stream` or `file`; a `list` 
is one event per element | `unchanged` |
   | azure-storage-queue | a `stream`, or no body | the text of sendMessage 
(the default) and updateMessage | `true`; a `list` for listQueues, 
receiveMessages and peekMessages |
   
   aws2-sqs (#28242) sends bytes, a stream or a file as text too, so its 
producer side now lists them.
   
   **Checked at runtime.** Routes logged the class of the body after each step, 
against `camel infra run aws` (SNS and Kinesis), `camel infra run google 
pub-sub` and `camel infra run azure storage-queue`.
   - **aws2-sns:**
     - text, bytes and a Map (sent as its toString()) were read back through an 
SQS queue subscribed to the topic;
     - a batch of PublishBatchRequestEntry gives a PublishBatchResponse, and a 
List of String fails.
   - **aws2-kinesis:**
     - text is one record, and a List is a batch of records;
     - the consumer gives a byte[];
     - a Map and a Path fail.
   - **google-pubsub:**
     - text and bytes are sent as they are, and both consumer modes give a 
byte[];
     - a Map goes through Java serialization;
     - a stream and a GenericFile fail.
   - **azure-storage-queue:**
     - sendMessage leaves `true` as the body, and a Map is sent as its 
toString();
     - an empty text arrives as no body;
     - the consumer gives the stream cache.
   - **azure-servicebus:** run without a broker, with its type converter. The 
BinaryData body converts to a String, but not to bytes or a stream, so its 
description says to convert it to a String first.
   - **azure-eventhubs and aws2-kinesis-firehose:** read from the code.
   
   **Measured.** I ran the validator over the 1204 human-written and 1209 
model-written route files, and the reports are the same as with #28251.
   
   **Tests**
   - `TextBodyFlowTest.testTheBodyOfCloudMessaging`:
     - a field read after the event hubs and the queue consumers is reported;
     - parsed data sent to google-pubsub is reported;
     - a List sent to aws2-kinesis is a batch, so it is not reported.
   - These pass:
     - the 282 tests of camel-yaml-dsl-validator;
     - the 265 validator and catalog doc tests of camel-jbang-core;
     - the build of camel-yaml-dsl-deserializers, which reads the catalog.
   - The answers of camel_catalog_doc stay under 18 000 characters: 
azure-servicebus, the largest, is 17 604.
   
   _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