You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Michel Betancourt <mi...@gmail.com> on 2017/01/18 14:15:20 UTC

Camel Bindy - Mixed fixed and variable length processing?

Hi Camel Users,

I am new to Camel and Camel Bindy and read through all the documentation for Bindy.  Due to my newbie-ness it’s not perfectly clear if Bindy can read the message without additional customization.

I’ve got a message such as this one:

YYY000g20xxxxxxxxxxxxxxxx

where the first 9 characters are fixed length (YYY000g20) and the last set of characters (xxxx) are variable length.  The variable length is determined from positions 4-7 but it is encoded in base 32.

Any thoughts if Bindy can handle any of the following scenarios:

 1. Read each fixed length field and then read in the position field converting to decimal so that Bindy can read it the remaining field with it’s lengthPos field
 2. Read the fixed length characters then read the remaining set of characters
 3. Other?


Thoughts?



Re: Camel Bindy - Mixed fixed and variable length processing?

Posted by "Walzer, Thomas" <th...@integratix.net>.
You could always roll your own. 
But maybe it works with camel-beanio. Haven´t tried it though...

Cheers, Thomas.

> Am 10.02.2017 um 19:35 schrieb ruili1 <ru...@gmail.com>:
> 
> I have a similar question but simpler. My application is consuming a fixed
> length format file today. But for some new feature the producer will
> introduce new fields at the end of the record therefore increase the length.
> So I need my application to be able to handle both lengths as it comes so
> that I don't have to release my code together with the producer. Is this
> something easily achievable in Bindy? Or I need to write my own formatter as
> well?
> 
> Thanks.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Bindy-Mixed-fixed-and-variable-length-processing-tp5792746p5793773.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Camel Bindy - Mixed fixed and variable length processing?

Posted by ruili1 <ru...@gmail.com>.
I have a similar question but simpler. My application is consuming a fixed
length format file today. But for some new feature the producer will
introduce new fields at the end of the record therefore increase the length.
So I need my application to be able to handle both lengths as it comes so
that I don't have to release my code together with the producer. Is this
something easily achievable in Bindy? Or I need to write my own formatter as
well?

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Bindy-Mixed-fixed-and-variable-length-processing-tp5792746p5793773.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Bindy - Mixed fixed and variable length processing?

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

I dont think this is a good use-case for using bindy when you have
such a special format.

I would write my own formatter, just read the line and parse it
yourself in a java bean and transform to the POJO model you like.



On Wed, Jan 18, 2017 at 3:15 PM, Michel Betancourt
<mi...@gmail.com> wrote:
> Hi Camel Users,
>
> I am new to Camel and Camel Bindy and read through all the documentation for Bindy.  Due to my newbie-ness it’s not perfectly clear if Bindy can read the message without additional customization.
>
> I’ve got a message such as this one:
>
> YYY000g20xxxxxxxxxxxxxxxx
>
> where the first 9 characters are fixed length (YYY000g20) and the last set of characters (xxxx) are variable length.  The variable length is determined from positions 4-7 but it is encoded in base 32.
>
> Any thoughts if Bindy can handle any of the following scenarios:
>
>  1. Read each fixed length field and then read in the position field converting to decimal so that Bindy can read it the remaining field with it’s lengthPos field
>  2. Read the fixed length characters then read the remaining set of characters
>  3. Other?
>
>
> Thoughts?
>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2