davsclaus commented on code in PR #11838:
URL: https://github.com/apache/camel/pull/11838#discussion_r1372060730


##########
components/camel-azure/camel-azure-servicebus/src/main/java/org/apache/camel/component/azure/servicebus/ServiceBusProducer.java:
##########
@@ -147,12 +147,12 @@ private BiConsumer<Exchange, AsyncCallback> 
sendMessages() {
 
             Mono<Void> sendMessageAsync;
 
-            if (exchange.getMessage().getBody() instanceof Iterable) {
+            if (exchange.getMessage().getBody() instanceof Iterable<?>) {
                 sendMessageAsync
-                        = 
serviceBusSenderOperations.sendMessages(convertBodyToList((Iterable<Object>) 
inputBody),
+                        = 
serviceBusSenderOperations.sendMessages(convertBodyToList((Iterable<?>) 
inputBody),
                                 
configurationOptionsProxy.getServiceBusTransactionContext(exchange), 
applicationProperties);
             } else {
-                sendMessageAsync = 
serviceBusSenderOperations.sendMessages(exchange.getMessage().getBody(String.class),
+                sendMessageAsync = 
serviceBusSenderOperations.sendMessages(inputBody,

Review Comment:
   Ok thanks, but we need to leverage Camels type converter systems, so eg if 
your body is a `java.io.File` or `InputStream` then they can be sent as-is 
also. 
   
   And is BinaryData some kind of azure class ?



-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to