|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
IIB9: Custom Java InputNode |
« View previous topic :: View next topic » |
Author |
Message
|
akil |
Posted: Sun Mar 05, 2017 8:31 am Post subject: IIB9: Custom Java InputNode |
|
|
 Partisan
Joined: 27 May 2014 Posts: 338 Location: Mumbai
|
I am planning to create a custom FileInputNode that will process large XLS files, using the POI-HSSF java classes. The node would read the XLS file one row at a time, created a BLOB message for the row and send it to the out terminal.
This node needs to support multiple instances like the FileInput node, meaning that additional instances will allow multiple XLS files to be processed at the same time, while each file will be processed row by row & serially.
The documentation mentions calling dispatchThread, but from what I see, while the file will be read 1 row at a time, multiple threads will result in a single file to be processed in parallel. This isn't what I want..
What would be the threading model to use to be similar to the FileInput node?
Quote: |
To create multithreaded message flows, you call the dispatchThread method after a message is created, but before the message is propagated to an output terminal. This action ensures that only one thread is waiting for data while other threads are processing the message. New threads are obtained from the thread pool up to the maximum limit specified by the Additional Instances property of the message flow. For example:
|
[/list] _________________ Regards |
|
Back to top |
|
 |
aruncg |
Posted: Sun Apr 11, 2021 9:14 pm Post subject: |
|
|
Novice
Joined: 08 Mar 2013 Posts: 22
|
Hi Akil,
I am also looking for suggestion on a similar situation where Java User defined input node needs to have additional instances. How is that achievable in a thread safe manner?
thanks in advance. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Apr 11, 2021 9:57 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
aruncg wrote: |
Hi Akil,
I am also looking for suggestion on a similar situation where Java User defined input node needs to have additional instances. How is that achievable in a thread safe manner?
thanks in advance. |
You need to use the existing File Input Node, use a Streaming parser and park your stream in the Local Environment. This way you still get to read one record at a time and you get to delete the record after reading it... Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|