Open nodesocket opened 9 years ago
Anybody?
are you setting a timeout on your message that you place on the queue? (if not the default is still 60 seconds) how long does the GET, processing, and then send a DELETE?
if could be possible after the first consumer does a GET if 60 seconds(timeout) passes the message ends up back on the queue and is processed by a 2nd consumer. the first consumer sends the delete request which gets received successfully and the second consumer gets a 404 when it attempts a delete.
So, we create a queue for each message (push) and then queue a message. The exact code is like:
////
// Create the IronMQ queue
//
// Unicast queue
// 80 retries every 15 seconds, total retry time of 20 minutes.
////
$ironmq_options = array(
"push_type" => "unicast",
"retries" => 80,
"retries_delay" => 15,
"subscribers" => array(
array(
"url" => $subscriber_url,
"headers" => $ironmq_http_headers
)
),
"error_queue" => "error-api-executions"
);
$ironmq_queue = $ironmq->updateQueue($ironmq_queue_name, $ironmq_options);
////
// Send the message to the newly created IronMQ queue
//
// Timeout after 20 minutes.
////
$ironmq_response = $ironmq->postMessage($ironmq_queue_name, $json_payload, array(
"timeout" => 60*20
));
Total time from creating the queue and adding the message to trying to delete it is fast. Basically, as long as it takes Iron.io to send the message to the push endpoint. One of the first things the push endpoint does, is delete the message and queue. So let's call it less than 250ms once Iron.io sends the message to the push endpoint.
Recently we've been seeing an error when deleting/acknowledging an IronMQ message.
Response is a
404
with:Initially we thought we must be calling
deleteMessagePushStatus()
multiple times, but after checking our code, there is only a single call.What is happening?