Hi Jason

That is good news, thanks for sharing that your team found a solution for
this issue.


On Wed, Mar 4, 2026 at 3:48 PM Jason Jackson <[email protected]>
wrote:

> To update everyone one this issue
>
> We were able to determine the placing application was adding MIME data to
> the beginning of the binary data and placing a wrapper around it.
>
> We corrected this and the data comes across correctly now.
>
>
> Jason
>
> ________________________________
> From: Jason Jackson <[email protected]>
> Sent: Sunday, March 1, 2026 8:03 AM
> To: [email protected] <[email protected]>
> Subject: Re: Camel and ActiveMQ SFTP Data Transfers in Raw Binary Format
>
> Thanks for responding so quickly.
>
> The sending application is an appliance, and I have that group validating
> how data is being sent along with what connection options and settings are
> used.  The connection from the appliance to ActiveMQ is performed using the
> AMPQ protocol.  The data is suppose to be in binary format when it is
> placed onto the ActiveMQ queue.
>
> Are you stating that jmsMessageType=Bytes is only valid when data is
> placed onto a queue not when read?
>
> Are there any specific trace settings I should set/enable or just trace
> everything?
>
>
> Jason
>
> ________________________________
> From: Claus Ibsen <[email protected]>
> Sent: Saturday, February 28, 2026 11:35 AM
> To: [email protected] <[email protected]>
> Subject: Re: Camel and ActiveMQ SFTP Data Transfers in Raw Binary Format
>
> CAUTION: This email originated from outside of the organization. Do not
> click links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
> [You don't often get email from [email protected]. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Hi
>
> When you set jmsMessageType=Bytes then are you sure the sender is sending
> the data to the ActiveMQ as byte data?
> This option is in fact only for when YOU send messages from Camel to the
> broker. Not when you RECEIVE.
>
> You can turn on TRACE logging on org.apache.camel.component.jms
> Then Camel will log what kind of JMS message it detected from the broker,
> such as
>
> LOG.trace("Extracting body as a TextMessage from JMS message: {}",
> message);
>
>
>
> On Sat, Feb 28, 2026 at 4:56 PM Jason Jackson <[email protected]>
> wrote:
>
> > I should have provided that and was not thinking.
> >
> > I am using the Camel version that is embedded with ActiveMQ 6.2.1 which
> is
> > 4.14.4
> >
> >
> > Jason
> >
> >
> > ________________________________
> > From: Claus Ibsen <[email protected]>
> > Sent: Saturday, February 28, 2026 10:49 AM
> > To: [email protected] <[email protected]>
> > Subject: Re: Camel and ActiveMQ SFTP Data Transfers in Raw Binary Format
> >
> > CAUTION: This email originated from outside of the organization. Do not
> > click links or open attachments unless you recognize the sender and know
> > the content is safe.
> >
> >
> > [You don't often get email from [email protected]. Learn why this is
> > important at https://aka.ms/LearnAboutSenderIdentification ]
> >
> > Hi
> >
> > What version of Apache Camel are you using?
> >
> > On Sat, Feb 28, 2026 at 4:33 PM Jason Jackson <[email protected]
> >
> > wrote:
> >
> > > I am receiving data within ActiveMQ on QUEUE_1, the data that arrives
> on
> > > the queue is in a raw binary format.  The data is being retrieved from
> > > ActiveMQ using a Camel route and transmitted to an alternate location
> > using
> > > SFTP.  If the data is modified in any way the destination location will
> > > reject the data.  When the Data is retrieved from ActiveMQ and sent via
> > > SFTP there is a slight files size difference and data does not appear
> to
> > be
> > > in the exact format.
> > >
> > > After my initial testing I discovered I was possibly missing one
> setting
> > > on the from uri line, I added jmsMessageType=Bytes to force JMS to know
> > the
> > > file is in binary format.
> > >
> > > My example Camel rout I am using is below.
> > >
> > > <beans
> > >    xmlns="
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.springframework.org%2Fschema%2Fbeans&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934771971412%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=bbChESbFimpaLLG8sgSrQxVcYXBH%2F2T60c4lnIr%2FBjM%3D&reserved=0
> <http://www.springframework.org/schema/beans>
> > <
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.springframework.org%2Fschema%2Fbeans&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772006861%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=f%2BeVU14Re%2FKLs%2Bn43bsNPxvFsq8xvcQrVhn3gbU1pf8%3D&reserved=0
> <http://www.springframework.org/schema/beans>>"
> > >    xmlns:xsi="
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772030730%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=R%2F6U4tYnRjFSH5mntu%2F3AL6%2B2yQj7VvXWJysjdOJdxs%3D&reserved=0
> <http://www.w3.org/2001/XMLSchema-instance>
> > <
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772052492%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=N2c5A5PoRrAfpB9xgoYiVHevRKkK8zHrLqt50GrrVpI%3D&reserved=0
> <http://www.w3.org/2001/XMLSchema-instance>>"
> > >    xsi:schemaLocation="
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772071607%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=dsVURP2A0KlrXxkRNLewy3gziduM66DdXxrB%2FmNOa2E%3D&reserved=0
> <http://camel.apache.org/schema/spring>
> > >
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring%2Fcamel-spring.xsd&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772089763%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=3DoWA5d2u21rvotUidUXumgVBf8pb1ZyWON9KMH015M%3D&reserved=0
> <http://camel.apache.org/schema/spring/camel-spring.xsd>
> > <
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring%2Fcamel-spring.xsd&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772108387%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=xDQUKzvUBGVOzbvcmVinDbvvYrlXEflQ41vdXfSs9Qs%3D&reserved=0
> <http://camel.apache.org/schema/spring/camel-spring.xsd>>
> > >
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.springframework.org%2Fschema%2Fbeans&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772126560%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=dDH8ztn%2FwWhhBySet%2BHR%2FeR1VP7tP5lL5Nnyg7875iE%3D&reserved=0
> <http://www.springframework.org/schema/beans>
> > <
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.springframework.org%2Fschema%2Fbeans&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772143724%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=GeCJKKRMiN2Ul0X%2Bge6f9vllCfvGC0RJdXLoeR1xvRw%3D&reserved=0
> <http://www.springframework.org/schema/beans>>
> > >
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.springframework.org%2Fschema%2Fbeans%2Fspring-beans.xsd&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772157586%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=PCXm4nFz9AB3GIPReExBkxS59mBdL%2F1u3KbaK669iZk%3D&reserved=0
> <http://www.springframework.org/schema/beans/spring-beans.xsd>
> > "><
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.springframework.org%2Fschema%2Fbeans%2Fspring-beans.xsd&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772171143%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=P7vQGWaix5%2Bevz9JDVNPh2%2FkqrAWJ7mpmc34eRNHKiw%3D&reserved=0
> >
> > >
> > >    <camelContext id="camel" xmlns="
> >
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772189357%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=yxITPcSZ3JNxXef7J0nl7CVxunG8I4NB8l9FGeMI0X4%3D&reserved=0
> <http://camel.apache.org/schema/spring>
> > <
> https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcamel.apache.org%2Fschema%2Fspring&data=05%7C02%7Cjason.jackson%40itechag.com%7C3a20b74aab1b4a07959308de76e7b720%7C07e5f1b9902a4d9f974c04601319bfec%7C0%7C0%7C639078934772204709%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C60000%7C%7C%7C&sdata=xciZNHBhNRGc0JBFqOZkbJs58W2kO3gZ4XkNJgmv99c%3D&reserved=0
> <http://camel.apache.org/schema/spring>>"
> > > streamCache="true">
> > >       <route id="QUEUE_1">
> > >          <from
> > >
> >
> uri="jms:queue://QUEUE_1?jmsMessageType=Bytes&amp;cacheLevelName=CACHE_CONSUMER&amp;concurrentConsumers=4&amp;maxConcurrentConsumers=10&amp;maxMessagesPerTask=200&amp;transacted=true&amp;lazyCreateTransactionManager=false&amp;acknowledgementModeName=CLIENT_ACKNOWLEDGE&amp;connectionFactory=#broker1"/>
> > >          <setProperty name="sftpFileName">
> > >             <simple>${header.JMSCorrelationID}</simple>
> > >          </setProperty>
> > > <!--
> > >          <convertBodyTo type="java.io.InputStream"/>
> > >          <convertBodyTo type="byte[]"/>
> > >          <convertBodyTo type="java.lang.Byte[]"/>
> > > -->
> > >          <to uri="sftp://user@ip
> > >
> >
> /dir?password=myPassword&amp;autoCreate=true&amp;binary=true&amp;passiveMode=true&amp;knownHostsFile=/dir/hosts&amp;fileName=${exchangeProperty.sftpFileName}"/>
> > >       </route>
> > >    </camelContext>
> > > </beans>
> > >
> > >
> > > I am not sure if any additional transformations or settings are
> required
> > > in or to retrieve the file from ActiveMQ and send it via SFTP in pure
> raw
> > > binary format.
> > >
> > > I attempted to set/use the lines that are commented out but receive
> > > additional errors in my log file, those errors are below.
> > >
> > >
> > > Caused by: org.apache.camel.InvalidPayloadException: No body available
> of
> > > type: java.io.InputStream but has type: java.lang.Byte[] on:
> > > Message[ID:broker_1]. Caused by: No type converter available to convert
> > > from type: java.lang.Byte[] to the required type: java.io.InputStream.
> > > Exchange[]. Caused by:
> > [org.apache.camel.NoTypeConversionAvailableException
> > > - No type converter available to convert from type: java.lang.Byte[] to
> > the
> > > required type: java.io.InputStream]
> > >
> > > Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
> > > converter available to convert from type: java.lang.Byte[] to the
> > required
> > > type: java.io.InputStream
> > >
> > > Execution of JMS message listener failed. Caused by:
> > > [org.apache.camel.component.file.GenericFileOperationFailedException -
> > > Cannot store file: dir/file.name] |
> > > org.apache.camel.component.jms.EndpointMessageListener | Camel (camel)
> > > thread #2 - JmsConsumer[QUEUE_1]
> > >
> > > Caused by: org.apache.camel.InvalidPayloadException: No body available
> of
> > > type: java.io.InputStream but has type: java.lang.Byte[] on:
> > > Message[ID:broker_1]. Caused by: No type converter available to convert
> > > from type: java.lang.Byte[] to the required type: java.io.InputStream.
> > > Exchange[]. Caused by:
> > [org.apache.camel.NoTypeConversionAvailableException
> > > - No type converter available to convert from type: java.lang.Byte[] to
> > the
> > > required type: java.io.InputStream]
> > >
> > > Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
> > > converter available to convert from type: java.lang.Byte[] to the
> > required
> > > type: java.io.InputStream
> > >
> > >
> > > Does the example route above appear correct or should some additional
> > > settings/conversions be added
> > >
> > >
> > >
> > > Jason
> > >
> >
> >
> > --
> > Claus Ibsen
> >
>
>
> --
> Claus Ibsen
>


-- 
Claus Ibsen

Reply via email to