[jira] Created: (CAMEL-179) Handling StreamSource when routing to multiple endpoints

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

[jira] Created: (CAMEL-179) Handling StreamSource when routing to multiple endpoints

JIRA jira@apache.org
Handling StreamSource when routing to multiple endpoints
--------------------------------------------------------

                 Key: CAMEL-179
                 URL: https://issues.apache.org/activemq/browse/CAMEL-179
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.1.0
            Reporter: Gert Vanthienen
            Priority: Minor


If the original message in the example below contains a StreamSource, the second target in the to() will probably fail.  Auto-converting it to e.g. DOMSource should fix this...

{code}
from("jbi:service:urn:servicemix:tutorial:wiretap")
         .to("jbi:endpoint:urn:servicemix:tutorial:jms:myQueue", "jbi:endpoint:urn:servicemix:tutorial:file:sender");
{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-179) Handling StreamSource when routing to multiple endpoints

JIRA jira@apache.org

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

Gert Vanthienen updated CAMEL-179:
----------------------------------

    Attachment: CAMEL-179.diff

This patch is a first attempt to solve this issue.  As discussed on IRC, a reusable ReReadableInterceptor was created to make it easier to add message re-readability to e.g. the dead letter channel afterwards.

> Handling StreamSource when routing to multiple endpoints
> --------------------------------------------------------
>
>                 Key: CAMEL-179
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-179
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Gert Vanthienen
>            Priority: Minor
>         Attachments: CAMEL-179.diff
>
>
> If the original message in the example below contains a StreamSource, the second target in the to() will probably fail.  Auto-converting it to e.g. DOMSource should fix this...
> {code}
> from("jbi:service:urn:servicemix:tutorial:wiretap")
>          .to("jbi:endpoint:urn:servicemix:tutorial:jms:myQueue", "jbi:endpoint:urn:servicemix:tutorial:file:sender");
> {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-179) Handling StreamSource when routing to multiple endpoints

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

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

James Strachan commented on CAMEL-179:
--------------------------------------

Great stuff. I guess there are more routes that could lead to the same body being re-read other than just the multicast type; so I guess we might wanna apply this interceptor by default anyway - or at least make it a default and let folks remove it maybe?

I can imagine we'd also wanna do things like support other types such as...

* InputStream
* Reader

I wonder if the default behaviour should be to make things re-readable by default to avoid common issues (e.g. retry logic) - but have some way where we can explicitly disable the re-reading behaviour when we really don't want it (which is gonna be pretty rare)

> Handling StreamSource when routing to multiple endpoints
> --------------------------------------------------------
>
>                 Key: CAMEL-179
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-179
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Gert Vanthienen
>            Priority: Minor
>         Attachments: CAMEL-179.diff
>
>
> If the original message in the example below contains a StreamSource, the second target in the to() will probably fail.  Auto-converting it to e.g. DOMSource should fix this...
> {code}
> from("jbi:service:urn:servicemix:tutorial:wiretap")
>          .to("jbi:endpoint:urn:servicemix:tutorial:jms:myQueue", "jbi:endpoint:urn:servicemix:tutorial:file:sender");
> {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-179) Handling StreamSource when routing to multiple endpoints

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

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

Gert Vanthienen updated CAMEL-179:
----------------------------------

    Attachment: CAMEL-179-v2.diff

Second attempt in attached CAMEL-179-v2.diff

The interceptor now uses Camel's type converter with a new interface instead of a hard-coded conversion map.  

I've added methods to RouteBuilder and RouteType to make it easier to use the new interceptor, but if we still want to make it the default, I would like some feedback on the asynchonous test cases going astray after implementing this -- can't seem to figure out what's going on there.

> Handling StreamSource when routing to multiple endpoints
> --------------------------------------------------------
>
>                 Key: CAMEL-179
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-179
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Gert Vanthienen
>            Priority: Minor
>         Attachments: CAMEL-179-v2.diff, CAMEL-179.diff
>
>
> If the original message in the example below contains a StreamSource, the second target in the to() will probably fail.  Auto-converting it to e.g. DOMSource should fix this...
> {code}
> from("jbi:service:urn:servicemix:tutorial:wiretap")
>          .to("jbi:endpoint:urn:servicemix:tutorial:jms:myQueue", "jbi:endpoint:urn:servicemix:tutorial:file:sender");
> {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-179) Handling StreamSource when routing to multiple endpoints

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

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

James Strachan resolved CAMEL-179.
----------------------------------

    Fix Version/s: 1.4.0
       Resolution: Fixed

Patch applied with huge thanks! Its just missed the cut of the 1.3.0 release; but I figure it'd be good to kick the tyres on this one a bit then we'll release 1.4.0 pretty soon I hope

> Handling StreamSource when routing to multiple endpoints
> --------------------------------------------------------
>
>                 Key: CAMEL-179
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-179
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Gert Vanthienen
>            Priority: Minor
>             Fix For: 1.4.0
>
>         Attachments: CAMEL-179-v2.diff, CAMEL-179.diff
>
>
> If the original message in the example below contains a StreamSource, the second target in the to() will probably fail.  Auto-converting it to e.g. DOMSource should fix this...
> {code}
> from("jbi:service:urn:servicemix:tutorial:wiretap")
>          .to("jbi:endpoint:urn:servicemix:tutorial:jms:myQueue", "jbi:endpoint:urn:servicemix:tutorial:file:sender");
> {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-179) Handling StreamSource when routing to multiple endpoints

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

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

Hadrian Zbarcea updated CAMEL-179:
----------------------------------

    Fix Version/s: 1.3.0
                       (was: 1.4.0)

> Handling StreamSource when routing to multiple endpoints
> --------------------------------------------------------
>
>                 Key: CAMEL-179
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-179
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Gert Vanthienen
>            Priority: Minor
>             Fix For: 1.3.0
>
>         Attachments: CAMEL-179-v2.diff, CAMEL-179.diff
>
>
> If the original message in the example below contains a StreamSource, the second target in the to() will probably fail.  Auto-converting it to e.g. DOMSource should fix this...
> {code}
> from("jbi:service:urn:servicemix:tutorial:wiretap")
>          .to("jbi:endpoint:urn:servicemix:tutorial:jms:myQueue", "jbi:endpoint:urn:servicemix:tutorial:file:sender");
> {code}

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