On 03/16/2010 02:54 PM, Wes Parish wrote:

I have a question about the qpid::client::MessageReplayTracker C++ class.  I am using a 
MessageReplayTracker to send messages to a broker.  Periodically when I close the session 
and connection object from another thread I receive the following warning message that is 
printed to stderr: "Warning ignoring frame while closing connection".

I assume that this warning is being generated because I am closing the session& 
 connection while there is a message transfer in progress, is this correct?

Not necessarily, though trying to close a connection while it is still being used could easily result in such messages.

That message is logged when an unexpected frame is received after the connection has been close has been initiated. This may be because you have an open subscription and the broker is still sending you messages. Is it possible that fits your scenario?

 If this is the cause of the warning message then how do you flush and sync a 
MessageReplayTracker so that the session and connection can be closed without 
the warning message being printed and also ensure that all messages in the 
MessageReplayTracker have been sent?

Session::sync() is the best way. Note though that you would want to ensure that no other thread was still using the session to be sure that the sync actually marks the end of all traffic on the session. As above you would also want to make sure that any subscriptions were stopped or cancelled so that there would be no broker initiated traffic.


I tried the following:

1. I attempted to call the method MessageReplayTracker::checkCompletion(), 
assuming that this would flush and sync the MessageReplayTracker object, but I 
still receiving the warning.
2. I tried to call flush, sync and close on the session object that I passed 
into MessageReplayTracker through the init() method, but this did not work 
either.

Thanks,
Wes



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscr...@qpid.apache.org

Reply via email to