Copyright © TIBCO Software Inc. All rights reserved
Copyright © TIBCO Software Inc. All rights reserved


Chapter 4 Using the Adapter : Working with Batch Messages

Working with Batch Messages
If you want to subscribe to a batch of messages and generate the out file after receiving the entire batch, complete the following steps:
1.
Publish the batch of records with a publishSubjectName, for example, A.B.
2.
Using the subscriber, configure a subscription to the messages with the subscribeSubjectName set to "A.B" (in the FileSubscriber configuration file).
3.
Set the generateFileSubjectName="A.B" in the FileSubscriber configuration file.
4.
Set the generateFileFieldName="STOP" (can be any value, STOP is descriptive)
5.
After publishing the entire batch, publish a message with subjectName= "A.B", which contains the STOP field. For example.
    A.B
    {
    RVMSG_STRING 6 STOP "12345"
    }
or
 
   tibrvlisten: Listening to subject A.B
   [2002-01-22 20:30:14]: subject=A.B, message={STOP="TIBADAPTER"}
Note that this solution might not work in a multi-threaded environment. That is, if several FilePublishers are sending messages on the same subject, the above scenario fails

Copyright © TIBCO Software Inc. All rights reserved
Copyright © TIBCO Software Inc. All rights reserved