title: Binary file processing using ESBs (WSO2, Mule, Petals, Service Mix)
body: <p>I'm keen to use an ESB (probably WSO2, Mule, Petals or Service Mix) on a new project.  </p>
  
  <p>I have a number of business processes/ workflows which will work well in an ESB: however I'm struggling with one particular scenario.</p>
  
  <p>The basic requirement is to process incoming binary files through a number of stages:</p>
  
  <ul>
  <li>pre-processing the file using an external tool;</li>
  <li>splitting the file based on some configuration data;</li>
  <li>processing each of these smaller files to calculate a "score".  Some of this will be handled by code I will write, but external software will also be called in some instances;</li>
  <li>loading all the calculated scores into a database.  This must be done at the end of the flow rather than incrementally (as the primary key will be only be found during processing of the file);</li>
  <li>moving the initial file to an archive area.</li>
  </ul>
  
  <p>The incoming files will be dropped into a local directory.  All the tools support polling of a directory so this isn't a problem.  </p>
  
  <p>However, from what I've read most of the tools expect the payload of the message to be easily readable so that processing can be performed directly on the payload.  In my case I merely want to use the incoming file to generate my real payload data: the values which I will write to the database.</p>
  
  <p>Is this a pattern that ESBs can support?  Are there any articles about this kind of data processing with any of the above tools?  Should I be looking at any other technology/patterns?</p>
  
  <p>Hope this makes sense!</p>
  
  <p>Many thanks,</p>
  
  <p>Ken</p>