On 9/29/06, Hieu Phan Thanh <[EMAIL PROTECTED]> wrote:
Dear MINA-team, We are using the MINA 0.8.2 to implement a DataCollector application (apply the Service Wrapper in Unix) so that the data-loss issue is very critical. Our protocol: 1. Client sends a message 2. Software will decode and send the ACK to Client 3. Do business (via messageRecieved() methods).
Why don't you send an ack message *after* you finished the business logic? This is weird. The problem is:
When stopping my application, it has to complete all the message already sent ACK => what can I do? How could I get the number of being-processed messages (already sent to the ProtocolDecoderOutput.write() in decode() method) of MINA?
You can keep track of tasks you have to finish whenever you send an ACK by yourself. I think it's not what MINA is supposed to do. Does MINA show the API to get this number? No. When you stop your application, you have to wait until all queued tasks are finished. Otherwise, you could store the requests in a reliable storage such as database or a message queue. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
