The SIF® Zone
creating, assimilating, and promoting excellence in SIF® agent development

Disconnecting always leaves 1 item in the ZIS message queue

rated by 0 users
Not Answered This post has 0 verified answers | 2 Replies | 1 Follower

Top 75 Contributor
2 Posts
Points 30
b12simon posted on 02-01-2010 6:28

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.

  • | Post Points: 25

All Replies

Top 25 Contributor
5 Posts
Points 85

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...

 

  • | Post Points: 25
Top 75 Contributor
2 Posts
Points 30

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

  • | Post Points: 5
Page 1 of 1 (3 items) | RSS
Copyright ©2006-2009 sifzone.com
Sponsored by Edustructures
We Connect the Systems that Power Education
 
SIF and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.