- All Implemented Interfaces:
- MessagePersister
public class StreamPersister
extends Persister
StreamPersister listens to an XQueue and receives JMS Messages
from it. It puts the JMS Messages to an OutputStream as the output.
StreamPersister supports flow control and allows object control from
its owner. It is fault tolerant with retry and idle options.
In case that Destination is defined and scheme is tcp, StreamPersister
will send a request to the server to open the destination after the
connection and waits for the response. The request is supposed to contain
all the properties about the connection, the destination and the operation.
After the connection is established and the destination is opened,
StreamPersister will send JMS messages down the OutputStream for the
normal operation. In this case, SOTimeout is used for connection timeout
while ReceiveTime is used to timeout read().
In case of the tcp socket and SessioneSize is larger than 0, StreamPersister
will auto reconnect whenever the processed msg count is same as the value of
SessionSize to terminate the session frequently.
- Author:
- yannanlu@yahoo.com