You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/07/22 17:24:07 UTC

[GitHub] [camel-kamelets] bjethwan opened a new issue, #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

bjethwan opened a new issue, #980:
URL: https://github.com/apache/camel-kamelets/issues/980

   ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message
   
   I had below KameletBinding working with Timer source but with Azure ServiceBus.
   I was getting a type conversion error
   Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: com.azure.core.util.BinaryData to the required type: java.io.InputStream
   
   Hence, I added a JSON Serializer in between
   
   ```
   apiVersion: camel.apache.org/v1alpha1
   kind: KameletBinding
   metadata:
     name: aws-s3-streaming-upload-sink-binding
   spec:
     source:
       ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1alpha1
         name: azure-servicebus-source
       properties:
         connectionString: Endpoint=<<>>/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=<<>>
         topicOrQueueName: <<>>
         serviceBusReceiveMode: RECEIVE_AND_DELETE
     steps:
     - ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1alpha1
         name: json-serialize-action
     sink:
       ref:
         kind: Kamelet
         apiVersion: camel.apache.org/v1alpha1
         name: aws-s3-streaming-upload-sink
       properties:
         bucketNameOrArn: arn:aws:s3:::<<>>
         keyName: timer-source
         region: ap-south-1
         accessKey: <<>>
         secretKey: <<>>
         batchMessageNumber: 5
   ```
   
   Now the PROBLEM is that instead of capturing data it's capturing length of the message
   {"length":54}{"length":54}{"length":54}{"length":54}{"length":54}
   
   How to fix this?
   Do I need to configure the azure-servicebus-source Kamelet to make it output String/JSON? Is it reasonable to configure the Kamelet or should I copy and configure that one?


-- 
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-unsubscribe@camel.apache.org.apache.org

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


[GitHub] [camel-kamelets] oscerd commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1193745401

   Because it was enough to re-open the old ticket, instead of opening a new one.


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] oscerd closed issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
oscerd closed issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message
URL: https://github.com/apache/camel-kamelets/issues/980


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] bjethwan commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
bjethwan commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1193744895

   @oscerd 
   Why not let our discussion finish before you close the ticket? I can't understand the rush.


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] oscerd commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1196597608

   This should be fixed with https://github.com/apache/camel-kamelets/pull/983


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] oscerd commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1193716658

   The message from servicebus is always binary. 
   
   https://docs.microsoft.com/en-us/java/api/com.azure.messaging.servicebus.servicebusreceivedmessage.getbody?view=azure-java-stable#com-azure-messaging-servicebus-servicebusreceivedmessage-getbody()
   
   It's up to you to work with that. 


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] oscerd commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
oscerd commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1193822012

   One problem would be you need to call the toBytes() on the binaryData. We could do that, in the Kamelet for the moment and with a new Camel release in the component.


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] oscerd closed issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
oscerd closed issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message
URL: https://github.com/apache/camel-kamelets/issues/980


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] bjethwan commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
bjethwan commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1192789078

   @oscerd 
   Hi Andrea - I have reopened the issue.
   Unless I update the existing azure-servicebus-source to emit string messages.
   KameletBinding doesn't provide a way to correctly convert the Byte stream to String.
   As you can see that when I try to use json-serialize-action, instead of the actual message I am getting message length.
   
   
   


-- 
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-unsubscribe@camel.apache.org

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


[GitHub] [camel-kamelets] bjethwan commented on issue #980: Reopen of #962 - ISSUE WITH KAMELET azure-servicebus-source output is message length instead of message

Posted by GitBox <gi...@apache.org>.
bjethwan commented on issue #980:
URL: https://github.com/apache/camel-kamelets/issues/980#issuecomment-1193743043

   > [oscerd](/oscerd)
   
   I agree that it's binary.
   The question is how to get to String or JSON?
   The json serializer kamelet is emitting json with length of the message.
   
   For once kindly read through my message completely once.


-- 
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-unsubscribe@camel.apache.org

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