You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Raman Gupta <ro...@gmail.com> on 2011/11/07 00:20:10 UTC

Dynamic layout input to flatpack component

I'd like to use camel in a highly configurable application. As an
example, one component I'd like to use is the Flatpack component. The
layout (.pzmap.xml) information will be generated from user-entered
information stored in a database or other data structure, and this
lookup may vary depending on properties of the in message.

AFAICT, the built-in flatpack component cannot do this. Is this kind
of requirement better implemented outside of camel?

Cheers,
Raman

Re: Dynamic layout input to flatpack component

Posted by Willem Jiang <wi...@gmail.com>.
I think you can extends the current FixedLengthEndpoint to inject the 
PzMap that you want to load. If you want contribute the patch, we 
definitely welcome :)

On 11/7/11 3:00 PM, Raman Gupta wrote:
> In this case, I don't think dynamic URI is sufficient. I would need to
> build the pzmap.xml file dynamically and provide it to the flatpack
> endpoint, preferably as an injectable lookup bean that would implement
> some interface like this:
>
> interface LookupPzMap {
>      Resource getPzMap(Message m);
> }
>
> The component could of course cache compiled templates using the
> Resource as a key.
>
> Raman Gupta
> VIVO Systems
> http://vivosys.com
>
>
> On 11/07/2011 01:19 AM, Claus Ibsen wrote:
>> Hi
>>
>> Check this FAQ
>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>
>> Would it not be possible to specify the flatpack pzmap file in the uri
>> and then use recipient list, to have dynamic endpoints?
>>
>>
>> On Mon, Nov 7, 2011 at 12:20 AM, Raman Gupta<ro...@gmail.com>  wrote:
>>> I'd like to use camel in a highly configurable application. As an
>>> example, one component I'd like to use is the Flatpack component. The
>>> layout (.pzmap.xml) information will be generated from user-entered
>>> information stored in a database or other data structure, and this
>>> lookup may vary depending on properties of the in message.
>>>
>>> AFAICT, the built-in flatpack component cannot do this. Is this kind
>>> of requirement better implemented outside of camel?
>>>
>>> Cheers,
>>> Raman
>>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: Dynamic layout input to flatpack component

Posted by Raman Gupta <ro...@gmail.com>.
In this case, I don't think dynamic URI is sufficient. I would need to
build the pzmap.xml file dynamically and provide it to the flatpack
endpoint, preferably as an injectable lookup bean that would implement
some interface like this:

interface LookupPzMap {
    Resource getPzMap(Message m);
}

The component could of course cache compiled templates using the
Resource as a key.

Raman Gupta
VIVO Systems
http://vivosys.com


On 11/07/2011 01:19 AM, Claus Ibsen wrote:
> Hi
> 
> Check this FAQ
> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> 
> Would it not be possible to specify the flatpack pzmap file in the uri
> and then use recipient list, to have dynamic endpoints?
> 
> 
> On Mon, Nov 7, 2011 at 12:20 AM, Raman Gupta <ro...@gmail.com> wrote:
>> I'd like to use camel in a highly configurable application. As an
>> example, one component I'd like to use is the Flatpack component. The
>> layout (.pzmap.xml) information will be generated from user-entered
>> information stored in a database or other data structure, and this
>> lookup may vary depending on properties of the in message.
>>
>> AFAICT, the built-in flatpack component cannot do this. Is this kind
>> of requirement better implemented outside of camel?
>>
>> Cheers,
>> Raman
>>

Re: Dynamic layout input to flatpack component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Check this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

Would it not be possible to specify the flatpack pzmap file in the uri
and then use recipient list, to have dynamic endpoints?


On Mon, Nov 7, 2011 at 12:20 AM, Raman Gupta <ro...@gmail.com> wrote:
> I'd like to use camel in a highly configurable application. As an
> example, one component I'd like to use is the Flatpack component. The
> layout (.pzmap.xml) information will be generated from user-entered
> information stored in a database or other data structure, and this
> lookup may vary depending on properties of the in message.
>
> AFAICT, the built-in flatpack component cannot do this. Is this kind
> of requirement better implemented outside of camel?
>
> Cheers,
> Raman
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/