WebMethods for realtime data to Batch conversion

Hi,
We are planning to use webMethods for converting real-time data to batch. Source system sends the data in real-time and target system prefers data to be sent in batch. What is the best way to do it? We want to bunch messages based on time duration via configuration file?? What would be best approach in terms of performance and maintenance?

Possibilities we have come across includes :

1>storing data in file or database and then bunching into a batch data and then send it to the target system.
2> Use thread to thread communication to bunch data as each service request is invoked in new thread.

I would really appreciate if somebody can put some insight into to the problem… Thanks for your help.

If you have TN along with webMethods IS, I would make use of it to do batching. It is much more flexible.

If not, I will use your choice (1) as there is some amount of guaranteed delivery associated with it.

If you use Trading Networks you can queue documents that can be sent in a batch according to a predefined schedule. The queued documents are stored in the TN database and the processed based on the batch schedule.