Moving from eGate we only really had two interfaces that needed this
so we took the approach that uses both the standard HL7 file adapter
and a couple of cron scripts - which we just leveraged what we already
had.
We set the BO to start and stop on a schedule - which basically
creates a file with a time and datestamp in the name of whatever
messages are waiting in the queue. A cron script that runs offset from
that schedule just FTP's to the target system the files that match the
filename mask. Since the cron script and the cache scheduler use the
same clock we haven't hit a situation where the file is being written
to when we're trying to move/FTP it. We also use access checking in
the cron script to make sure, but in either case we've never tried
grabbing a file that is actively being written to.
The reason this works for us is that we were an eGate shop and our
monitoring tool used the output of the dgcmd to determine if an
interface was running or not - so we have a set of COS classes that
allows us to query all of our Ensemble links to get the same dgcmd
output. The cron scripts we use write output files that mimics the
output of that command, too - so it made life much easier.