# File lib/stomp_server/queue_manager.rb, line 128 def ack(connection, frame) puts "Acking #{frame.headers['message-id']}" if $DEBUG unless @pending[connection] puts "No message pending for connection!" return end msgid = frame.headers['message-id'] p_msgid = @pending[connection].headers['message-id'] if p_msgid != msgid # We don't know what happened, we requeue # (probably a client connecting to a restarted server) frame = @pending[connection] @qstore.requeue(frame.headers['destination'],frame) puts "Invalid message-id (received #{msgid} != #{p_msgid})" end @pending.delete connection # We are free to work now, look if there's something for us send_a_backlog(connection) end