oscerd commented on PR #29216:
URL: https://github.com/apache/camel/pull/29216#issuecomment-6653852768

   Thanks for the review. The changes for the first two points are in 
a8e93bf94f06.
   
   **byte[] in Ddb2JsonStructDataTypeTransformer.** Agreed: bytes are the same 
JSON in another carrier, and keeping them apart was not deliberate. A `byte[]` 
body now goes in the same branch as streams and files, `if (body instanceof 
byte[] || isStreamOrFile(body))`, so it is read as text with the type 
converters and the charset of the exchange, and the same JSON gives the same 
String whatever its carrier. The body types description now says "A String is 
left as it is, and bytes, a stream or a file are read as text", and the 
regenerated `aws2-ddb-application-x-struct.json` and its catalog copy have it. 
The new `bytesAreReadAsText` test reads UTF-8 bytes, and ISO-8859-1 bytes with 
that charset set on the exchange; with the change reverted it gets the JSON 
array of numbers. As a `byte[]` body used to come out as a JSON array of 
numbers, the upgrade guide has an entry for the change.
   
   **CamelAwsSqsQueueName with queueUrl.** Good catch, done. When the 
`queueUrl` option is set, the consumer takes the last part of its path as the 
queue name, ignoring a trailing slash, and otherwise the queue name of the 
endpoint as before. It works this out once, when the consumer is created. The 
new `theSourceIsTheQueueOfTheQueueUrl` test uses an endpoint whose path is 
`MyQueue` with a `queueUrl` that ends in `OtherQueue`, with and without a 
trailing slash, and checks that the header and the CloudEvent source both name 
`OtherQueue`; with the change reverted the header names `MyQueue`. The 
description of the header, "The name of the queue the message was received 
from.", still holds, so the generated files and the endpoint DSL do not change. 
The upgrade guide entry now mentions `queueUrl`.
   
   **Sibling transformers with a per-message source.** Agreed. 
`azure-storage-queue:application-cloudevents` builds the source from the 
message id and `google-pubsub:application-cloudevents` from the ack id, and 
`azure-storage-blob:application-cloudevents` (the ETag) and 
`google-calendar-stream:application-cloudevents` (the event id) do the same. 
This PR stays on the camel-aws2 items, and these are proposed as a follow-up 
item of the CAMEL-26300 series.
   
   _Claude Code on behalf of Andrea Cosentino (oscerd)_


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