Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to read messages in batches from tMomInput?

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.

 

 

Labels (2)
7 Replies
Anonymous
Not applicable
Author

Hello,

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.

Best regards

Sabrina

Anonymous
Not applicable
Author

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?

0683p000009LrNb.gif

Anonymous
Not applicable
Author

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.

https://www.rilhia.com/tutorials/load-data-dynamic-number-files

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.

Anonymous
Not applicable
Author

Thanks for your help. I will check that out.

Anonymous
Not applicable
Author

Did this resolve your question? If so can you set it to resolved so that others can benefit from this?

Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

Have you done with your batching concept? Because i need help in this batching concept. Plz let me know how to do this?