I am using TOS 5.6.1. I want to read messages in batches from tMomInput and write it into a file. The max. number of messages in each file should be 25. Could someone please give me some suggestion?
I am able to read one message at a time, but not in batches. Thanks.
So far, there is no "use batch size" in tMomXXX components. Feel free to create a new feature jira issue of DI project on talend bug tracker.
Hi Sabrina, thanks for your reply. I tried to achieve this using tLoop as shown below. But since tMomMessageIdList has only "iterate" to connect to another component, when it goes to that iterate, its not coming back to the tLoop iterate. Is there any other way to pull messages from tMomInput as batches?
This is a "thinking outside the box" type solution, but I think this tutorial might help you. Instead of thinking about batching the request, think about batching the output. The tutorial below demonstrates how to write to a different file depending on the data being supplied.
If you were to add some sort of sequence mechanism to your messages, you could quite easily write to a different file every time that sequence reached a max number of messages.
Thanks for your solution. But I got stuck and couldn't make this work. So for now I am sending one message at a time.