davsclaus commented on code in PR #28275:
URL: https://github.com/apache/camel/pull/28275#discussion_r4346438239
##########
components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsEndpoint.java:
##########
@@ -36,6 +39,14 @@
syntax = "azure-eventhubs:namespace/eventHubName", category = {
Category.CLOUD, Category.MESSAGING },
headersClass = EventHubsConstants.class)
+@BodyTypes(consumerOut = @BodyType(value = Carrier.BYTES, javaType = "byte[]",
+ description = "The body of the event, one
message per event"),
+ producerIn = @BodyType(value = { Carrier.TEXT, Carrier.BYTES,
Carrier.STREAM, Carrier.FILE, Carrier.LIST },
+ description = "What converts to a byte
array: text, bytes, a stream or a file, sent as one"
+ + " event; a Map, a number or
a POJO fails: marshal it first. A List is sent"
+ + " as one event per element,
in one batch, and an element that is an Exchange"
+ + " or a Message is sent with
its headers"),
+ producerOut = @BodyType(Carrier.UNCHANGED))
Review Comment:
Thanks, this one is on purpose. A plain `unchanged` with no description is
how the catalog writes a producer that leaves the message as it is: `kafka`,
`file`, `ftp`, `sftp`, `paho-mqtt5`, `azure-files`, `log` and `mock` all do the
same. The other entries in this PR have a description because they add
something the carrier does not say: the header with the message id
(google-pubsub), the sequence number and shard id (aws2-kinesis), or
`scheduleMessages` (azure-servicebus). `EventHubsProducer` sets no header and
does not touch the body after the send, so `"Unchanged"` would only repeat the
carrier.
_Claude Code on behalf of @davsclaus._
--
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]