You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/06/20 07:03:00 UTC

[jira] Created: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

File component - file rename pattern to support patterns such as date time etc.
-------------------------------------------------------------------------------

                 Key: CAMEL-621
                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.3.0, 1.4.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
             Fix For: 1.5.0


A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

I am experimenting with implementing a new FileLanguage that is based on the simple language for the pattern placeholders, so you can configure the endpoint something like this:

{{file://target/filelanguage/report.txt?moveExpression=${id}.bak}}

The new option *moveExpression* is a String option to set the FileLanguage expression where you can use plain text and use the different ${  } placeholders for convienient file name patterns


> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

Idea for patterns:
- the date/time stuff from java.text (YYY-mm-DD)
- ID the message ID (UUID)
- ORIGINAL the consumed filename so you can do Backup-${ORIGINAL}
- ORIGINALNOEXT the consumed filename without extension so you can do ${ORIGINALNOEXT}.bak

And should be using ${ } placeholders.

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

Its going quite well. Had a nice quite time on the 3h train ride without network access. The consumer part is more or less done, now I need to add it to the producer as well.

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Resolved: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen resolved CAMEL-621.
-------------------------------

    Resolution: Fixed

Okay party on with the new *expression* option on the file component.

Wiki is updated.

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

Anyone got good ideas for this one?

The idea is to have a simple pattern to set in the URI configuration or as a option on the FileEndpoint.

Most end-users need eg to move files into a "backup" folder with some kind of pattern usually a date pattern. This is as a shortcut for not needing to provide a speical headername yourself that you need to compute in Java using a bean/processor. Resorting to some EL is also doable but not easy for new users to camel and then there is also the dependency for the EL of choice.



> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

Ah I managed to add custom date support using retrieval of Date objects from message header. Needed when you want to use certain dates you have created.

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

Okay stuff commited to trunk. Now its *just the wiki documentation* missing ;)

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

Yep I had a wide smile when the relative folder expression worked like a charm.

Just fits my needs for file based backup of inbound messages. Would love a persistent sequencer though, but I can live without for the foreseeable future.

I am thinking about @deprecated some of the other filename based options on the file component, it starts to "smell" as the code is a bit "slided".

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Work started: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Work on CAMEL-621 started by Claus Ibsen.

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

And something with BEAN to invoke a bean method that can compute and return the filename. You can do this today and set the fileheader manually but it would be nicer if its easier to setup and use.

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

Posted by "Jonathan Anstey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45119#action_45119 ] 

Jonathan Anstey commented on CAMEL-621:
---------------------------------------

Oh, the new File expressions are very cool. Nice work!

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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


[jira] Commented: (CAMEL-621) File component - file rename pattern to support patterns such as date time etc.

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

Claus Ibsen commented on CAMEL-621:
-----------------------------------

ORIGINALPATH - The path to the original file
ORIGINALFULL - The full name path + name + ext

> File component - file rename pattern to support patterns such as date time etc.
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-621
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-621
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.3.0, 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.0
>
>
> A very common use case is to copy received messages into files stored in a backup folder with sub folders named with the date pattern etc.

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