[jira] Created: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org
File body types should send the contents of the File as a BytesMessage by default
---------------------------------------------------------------------------------

                 Key: CAMEL-299
                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-jms
            Reporter: James Strachan
             Fix For: 1.4.0


We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...

If users want a TextMessage from the File they could always be explicit in the code...

{code}
from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
{code}



--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41119#action_41119 ]

Christian Schneider commented on CAMEL-299:
-------------------------------------------

What would be the configuration if my file contains binary data. In this case I probably donĀ“t want a TextMessage.
Is there any way to tell convertBodyTo to convert to byte[]?

> File body types should send the contents of the File as a BytesMessage by default
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-299
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>            Reporter: James Strachan
>             Fix For: 1.4.0
>
>
> We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...
> If users want a TextMessage from the File they could always be explicit in the code...
> {code}
> from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
> {code}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41120#action_41120 ]

James Strachan commented on CAMEL-299:
--------------------------------------

A File would have to be assumed to be binary data really (I guess we could get clever and try and find the MIME type of the file possibly?) but by default I'd say File's should be trreated as binary; if you want it to be treated as text, then add the convertBodyTo(String.class) to the DSL


> File body types should send the contents of the File as a BytesMessage by default
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-299
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>            Reporter: James Strachan
>             Fix For: 1.4.0
>
>
> We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...
> If users want a TextMessage from the File they could always be explicit in the code...
> {code}
> from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
> {code}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-299:
------------------------------

        Fix Version/s: 1.5.0
                           (was: 1.4.0)
    Affects Version/s: 1.4.0

> File body types should send the contents of the File as a BytesMessage by default
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-299
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>            Reporter: James Strachan
>             Fix For: 1.5.0
>
>
> We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...
> If users want a TextMessage from the File they could always be explicit in the code...
> {code}
> from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
> {code}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-299:
---------------------------------

    Assignee: Claus Ibsen

> File body types should send the contents of the File as a BytesMessage by default
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-299
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>            Reporter: James Strachan
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...
> If users want a TextMessage from the File they could always be explicit in the code...
> {code}
> from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
> {code}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45534#action_45534 ]

Claus Ibsen commented on CAMEL-299:
-----------------------------------

File, Reader and InputStream is now converted to a {{javax.jms.BytesMessage}}. Before they were not picked up and send as ObjectMessage.

Christian you can always use the .convertBodyTo(byte[].class) to force a conversion to byte array.

> File body types should send the contents of the File as a BytesMessage by default
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-299
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>            Reporter: James Strachan
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...
> If users want a TextMessage from the File they could always be explicit in the code...
> {code}
> from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
> {code}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-299) File body types should send the contents of the File as a BytesMessage by default

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-299?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-299.
-------------------------------

    Resolution: Fixed

And java.nio.ByteBuffer is also handled.

> File body types should send the contents of the File as a BytesMessage by default
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-299
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-299
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-jms
>    Affects Versions: 1.4.0
>            Reporter: James Strachan
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> We might wanna double check the handling of other kinds of InputStream / Reader / ByteBuffer too...
> If users want a TextMessage from the File they could always be explicit in the code...
> {code}
> from("file://foo/bar").convertBodyTo(String.class).to("activemq:SomeQueue");
> {code}

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.