You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Andy Bourke (JIRA)" <ji...@apache.org> on 2010/01/22 16:27:43 UTC

[jira] Created: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Renamer failing to rename 'From' File when using multiple endpoints via Multicast
---------------------------------------------------------------------------------

                 Key: CAMEL-2394
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.1.0
         Environment: Windows Vista Business Service Pack 2, 32-bit
            Reporter: Andy Bourke


[Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]


I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 

This is the route: 

{code}
        <route id="iq"> 
            <from uri="file:/data/iq/inbound/"/> 
            <unmarshal> 
                <csv id="pipeCsvDataFormat"/> 
            </unmarshal> 
            <bean ref="iqTransform" method="doTransform"/> 
            <to uri="bean:iqProcessor?method=process"/> 
            <multicast parallelProcessing="true"> 
                <pipeline> 
                    <to uri="bean:formatOutput?method=formatHeader"/> 
                    <marshal> 
                        <csv /> 
                    </marshal> 
                    <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
                </pipeline> 
                <pipeline> 
                    <to uri="bean:formatOutput?method=formatLineHeader"/> 
                    <marshal> 
                        <csv /> 
                    </marshal> 
                    <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
                </pipeline> 
            </multicast> 
        </route> 

{code}

As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 

The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 

If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57093#action_57093 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

Hi Claus,

I have now tried 2.2-SNAPSHOT but I get the same result.

I'm going to try another OS.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57100#action_57100 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

Claus,

Yes, You are correct.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57085#action_57085 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy btw I also fixed a related bug CAMEL-2395 which could have had an issue on your windows OS.

If possible try using the latest 2.2-SNAPSHOT version and test using that.

Details at download page
http://camel.apache.org/download.html

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57084#action_57084 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy

I have created an unit test which resembles what you do
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FromFileMulticastToFilesTest.java

Can you try running it at your end on your windows system?

On my end it works with all 3 files being written and moved as expected.
I am using Mac OSX

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57393#action_57393 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

PS: The behavior of getOut() has been debated a lot. 

We may very well improve that in Camel 2.5/3.0 with an API change that allows us to take hand of this problem for you under the covers.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: claus.zip
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57328#action_57328 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

Hi Claus,

Relative path does not work and neither does absolute windows path using c:\ etc.

I have tried it on Linux also and have the same problem although the symptoms are naturally different on Linux because directories are files.

Do you not believe that the problem lies with the exchange header?

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57310#action_57310 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Yeah try with relative paths until I get CAMEL-2439 comitted. Running full test now on XP

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Resolved: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2394.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.3.0)
                   2.2.0

Glad it works for you.


> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>         Attachments: claus.zip
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57097#action_57097 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy

So in your test if the only problem was the header file being written as a GUID name, then that means the original file will be moved to the .camel sub directory.
And the file is not processed again.

Is this correct?

If so I suspect it could be an issue with the CSV marshaller. 

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57392#action_57392 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Ah in your bean you should copy the headers from IN to OUT.

eg doing getOut() creates a totally new independent message. 
Its generally better just to mutate IN.

Otherwise you should add something like this to your code
{code}
exchange.getOut().setHeaders(exchange.getIn().getHeaders());
{code}




> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: claus.zip
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57092#action_57092 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

Hi claus,

I have run the unit test and it fails.

The reason is that the out directory ends up with 2 files; one called footer.txt but the other is called b07dca17-9a03-4711-a283-f1497a53713c instead of header.txt.

foo.txt does end up in the .camel directory.

I'll try the 2.2-SNAPSHOT next.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57096#action_57096 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy yeah the file that got named with the UID thing was a bug in Camel which is fixed in CAMEL-2395. So you can work around this in 2.1 by using another file name which does not start with header. For example you could just name the files a.txt and b.txt.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Updated: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Bourke updated CAMEL-2394:
-------------------------------

    Attachment: claus.zip

I have stripped the route down to the minimum that doesn't work. It turns out that I can make it fail without multicast or anything complex.

If I take out the iqProcessor stage then it works.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: claus.zip
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57336#action_57336 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy can you create a sample of your problem and attach as zip. Can be used to look into the issue.

Its either the CSV data format or something you may do in your beans. The file to be moved in the end is store as a on completion on the Exchange should thus not be affected by headers. But I may give it a 2nd look in 2.3 as there is another issue when you consume from file and then use a pollEnrich to poll in a 2nd file.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>             Fix For: 2.3.0
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57399#action_57399 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

That's done the trick, many thanks Claus.

I did expect camel to do this for me, in fact it never occurred to me that I would have to do it myself. I do hope that the debate goes in favour of camel taking care of this - perhaps in the meantime something could be added to the documentation.



> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>         Attachments: claus.zip
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57311#action_57311 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

btw you can also try with windows absolute path, eg use {{file:c:\data}} , e.g. adding the C drive or what drive you run from.

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57309#action_57309 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

Yes, the paths are absolute. 

I could try using relative paths if you think that might help?

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Updated: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2394:
-------------------------------

    Fix Version/s: 2.3.0
         Assignee: Claus Ibsen

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Andy Bourke (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57217#action_57217 ] 

Andy Bourke commented on CAMEL-2394:
------------------------------------

Hi Claus,

Firstly, I still have not managed to work around or solve the problem - getting a bit desperate now...

I believe that I know where the problem is occurring:

In Pipline.process there is a call to: ExchangeHelper.copyResults(exchange, nextExchange), where 'exchange' is the original Exchange.

This call replaces the 'in' object in 'exchange' with the one in 'nextExchange'. As 'nextExchange' has no headers (they are not copied when nextExchange is created) 'exchange' has no headers and the 'GenericFileRenameProcessStrategy' tries to use 'CamelFileParent'  and 'CamelFileNameOnly' (or 'CamelFileName') to construct the rename filename. Therefore it tries to rename the original file to .\camel.

Does this make sense to you?

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57313#action_57313 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy you are welcome to test with latest code from trunk as I have committed a fix for Windows

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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


[jira] Commented: (CAMEL-2394) Renamer failing to rename 'From' File when using multiple endpoints via Multicast

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2394?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57306#action_57306 ] 

Claus Ibsen commented on CAMEL-2394:
------------------------------------

Andy are you using absolute paths? It appears so sine {{\data}} would indicates its from the {{<root>\data}} folder.

I am looking into an issue with Windows not being able to detect that {{\data}} is an absolute path. 

> Renamer failing to rename 'From' File when using multiple endpoints via Multicast
> ---------------------------------------------------------------------------------
>
>                 Key: CAMEL-2394
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2394
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.1.0
>         Environment: Windows Vista Business Service Pack 2, 32-bit
>            Reporter: Andy Bourke
>
> [Original Issue at Nabble|http://old.nabble.com/Renamer-failing-to-rename-%27From%27-File-when-using-multiple-endpoints-via-Multicast-td27272407s22882.html]
> I have a route that looks for a file in a directory => unmarshals the file using <CSV> => transforms the output from the unmarshal (which is List<List<String>>) to a List of data objects => passes the List of data objects to a processor which does the intelligent mapping of the input data to the output which is a List of Objects => passes the List of Objects to a <multicast> pipeline who's endpoints traverse the List of Objects and extract the data, that they are interested in, formatting the output in to a List of Map objects so that the <CSV> marshaller can marshal to a named file. 
> This is the route: 
> {code}
>         <route id="iq"> 
>             <from uri="file:/data/iq/inbound/"/> 
>             <unmarshal> 
>                 <csv id="pipeCsvDataFormat"/> 
>             </unmarshal> 
>             <bean ref="iqTransform" method="doTransform"/> 
>             <to uri="bean:iqProcessor?method=process"/> 
>             <multicast parallelProcessing="true"> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Txn_Header.txt"/> 
>                 </pipeline> 
>                 <pipeline> 
>                     <to uri="bean:formatOutput?method=formatLineHeader"/> 
>                     <marshal> 
>                         <csv /> 
>                     </marshal> 
>                     <to uri="file:/data/iq/outbound/?fileName=Line_Header.txt"/> 
>                 </pipeline> 
>             </multicast> 
>         </route> 
> {code}
> As expected, I get a correctly formatted file named Txn_Header.txt and a file named Line_Header.txt in the /outbound directory. So the routing seems to have worked fine. 
> The problem is that the original file does not get renamed in to the .camel subdirectory and so the file gets processed again and again. 
> If I remove the second endpoint in the multicast so that only the Txn_Header.txt file is produced then the original file does get renamed and the route ends successfully. 

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