We have SIF agents which do regular imports from a ZIS. At the end of the import, they disconnect from the ZIS using zone.disconnect(ADKFlags.PROV_NONE);
The final SIF message from the ZIS remains in its queue, despite being processed by our agent.
What I think is happening is that the agent is disconnecting before its final SIF_Ack is sent, meaning the ZIS does not delete the final message.
To test this idea I had the agent unregister instead of disconnect. On unregistering the queue on the ZIS was empty.
What I'd like to do is get the agent to wait until the SIF_Ack has been sent before disconnecting. Any suggestions how I'd do this?
I'm using the Java version.
Are you telling the zone to disconnect from inside your on queryResponse?
If so, I'd guess keep track of the request msgs sent and keep a pending query queue, monitor this outside of the on query results and call disconnect from the main thread...
You're right. Currently we are disconnecting from onQueryResults.
For the time being I've worked around it by disconnecting in a separate thread with a sort timeout. Obviously that's something of a hack so I'm keen to replace it with something better.
I'll try your suggestion and post back here when I get time.
Cheers
Simon