I am using Websphere Message Broker to process csv files and put the data onto a Message queue. The file is read in via a FileInputNode, passed through a JavaCompute node (for validation), then a message map that maps it to the the target format then onto a JMSOutput node.
The problem I have is that the first line in the csv has a single value that I need to add to each of the outbound messages (the first line is the header so is not output onto the queue). I am a little stu开发者_C百科ck on how to do this as I cannot see how I can elegantly map the a value from the first row onto all subsequent rows.
I have tried holding the value on the LocalEnvironment using the JavaCompute node, but this appears to be lost between rows (incidentally I am processing the file row by row, which is set on the fileinput node, so the whole flow is passed through for each record).
Any tips on how to achieve this would be appreciated.
Barry
Just a thought, but if you load up the value into a SHARED variable defined in the flow, it should not be lost between rows / execution of the flow as in the case of your LocalEnvironment idea... really brief first pass idea as I've not tried this yet.
精彩评论