Method: Beetle::Message#key_exists?
- Defined in:
- lib/beetle/message.rb
#key_exists? ⇒ Boolean
have we already seen this message? if not, set the status to “incomplete” and store the message exipration timestamp in the deduplication store.
232 233 234 235 236 237 238 |
# File 'lib/beetle/message.rb', line 232 def key_exists? = !@store.msetnx(msg_id, :status =>"incomplete", :expires => @expires_at.to_i, :timeout => (now + timeout).to_i) if logger.debug "Beetle: received duplicate message: #{msg_id} on queue: #{@queue}" end end |