Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client Java API Programmer's Guide | Using Sequence Numbers | Receipt Sequence Numbers | Default Acknowledgment
Default Acknowledgment
The following methods will automatically acknowledge all previously retrieved events for your receiving Broker client, effectively ignoring sequence numbers:
This default behavior avoids the loss of events from the client's queue in cases where your application crashes while processing an event, because the event is not acknowledged until the next time your Broker client requests an event. The next time your Broker client requests an event, the Broker will assume the last retrieved event has already been processed.
Your Broker client can acknowledge the received event by either asking for another event, using the same get-event method, or by explicitly calling BrokerClient.acknowledge. A Broker client that is implicitly acknowledging events would normally call BrokerClient.acknowledge only if it is planning to exit and wants to acknowledge all previously retrieved events without actually receiving any more events.
Before exiting, Broker clients with an explicit-destroy life cycle that are using BrokerClient.getEvent or BrokerClient.getEvents with implicit acknowledgment should explicitly acknowledge the receipt sequence number of the last event received using either BrokerClient.acknowledge or BrokerClient.acknowledgeThrough. Failure to do so will result in the last event being received again the next time you connect the Broker client.