Closed wangli3274 closed 10 years ago
Hi, I'm not aware of any messages getting lost either in testing, or in production either in my own deployment or others running Sneakers. Are you sure there's nothing related to networking that you are bumping into?
Hey I am also facing the same issue, After getting 4 messages, now i can see the fifth message in queue in RabbitMQ plugin management, but sneaker is not consuming it.
require 'sneakers'
Sneakers.configure heartbeat: 5,
amqp: ENV['RABBITMQ'] || 'amqp://*****:****@localhost:5672/',
workers: 1,
timeout_job_after: 60,
threads: 5,
prefetch: 5,
after_fork: Proc.new { ActiveRecord::Base.establish_connection },
durable: true
Sneakers.logger.level = Logger::INFO
@kamal-github you can inspect channels, their QoS prefetch value, and how many messages are pending acknowledgement in the management UI. See RabbitMQ tutorial 2 if something isn't clear.
@michaelklishin Is there any limit like if no acknowledgment coming of messages to RabbitMQ, either sneakers stop consuming or Rabbit deny giving it to Sneakers?
Also, I saw management UI, channel has prefetch value = 5 and pending acknowledgement = 0
@kamal-github Hello, did you solve this issue ? I am facing the same issue that always two messages are not received by sneakers but are available in rabbitmq. If i have 1 worker then the first two messages are not received, the third one is received and then the next two are not received and so on
Run this [WORKERS=TradeWorker rake sneakers:run] command first. the work coding :
then publish 10000 messages into the queue, used :
the lost message problem happend!
there is no problem when publish 10000 messages into the queue,used
there is also no problem when set the Sneakers.configure workers to 1.
changed the open source [~/.rvm/gems/ruby-2.0.0-p451/gems/sneakers-0.0.7/lib/sneakers/queue.rb] into:
the lost message problem alse happend!