On 08/09/2011 08:10 AM, et3w503 wrote:
Dear all:

My qpidd server crashed because consumer's behavior.

My consumer program(client) always released message if something could not
be done in Subscribe callback.

Are you using the qpid::client API and if so are completions being sent? What are your subscription settings?

But some things are interesting when I looked for the reason why qpidd will
crash.

I found if consumer release message in Subscribe callback, the qpidd server
will not earse unacked DeliveryRecords.

in
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?view=markup

line 695.

The size of unacked  DeliveryRecords will increase continually until qpidd
server crashes.

Why not earse unacked DeliveryRecords in SemanticState::release ? or any
other idea to prevent this situation?

You are right, well spotted!

We can only delete the record when ended (released/rejected/accepted) *and* completed (at the session level) for window based subscriptions as the record is also needed to move the window forward correctly.

However if we have already received completions for the released items, then we can - and should - do that removal immediately on release (as for reject and accept). I will get a fix in for that (QPID-3400).

Having said that, I am a little surprised that the records are never removed (rather than just being removed late) unless it is a result of not receiving the completions. That is certainly a possibility if using the qpid::client API and never calling accept. If you call Session::sendCompletion() after releasing that should provide a workaround.

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

Reply via email to