From 806d0966729984e6e83bfa9efc93a73c8480fd8d Mon Sep 17 00:00:00 2001 From: Stephenitis Date: Mon, 20 Jul 2015 15:26:00 -0700 Subject: [PATCH 1/2] add documentation on batch deletes function --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5d44041..2c71efb 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ queue.post(messages, function(error, body) {}); queue.post("hello IronMQ!", function(error, body) {}); // with options queue.post({body: "hello IronMQ", delay: 30}, function(error, body) {}); -// or multiple messages +// or batch post multiple messages queue.post(["hello", "IronMQ"], function(error, body) {}); // messages with options queue.post( @@ -188,6 +188,14 @@ Default is 0 seconds. Maximum is 604,800 seconds (7 days). ```javascript queue.del(message_id, function(error, body) {}); ``` +to batch delete multiple messages from a queue pass multiple message ids in an array to the del_multiple function + +```javascript +queue.del_multiple([message.id, message.id], function(error, body) {}); +// OR +queue.del_multiple(["abdc1234", "abdc12345"], function(error, body) {}); +``` + Be sure to delete a message from the queue when you're done with it. @@ -211,8 +219,8 @@ queue.del_queue(function(error, body) {}); ## Push Queues -IronMQ push queues allow you to setup a queue that will push to an endpoint, rather than having to poll the endpoint. -[Here's the announcement for an overview](http://blog.iron.io/2013/01/ironmq-push-queues-reliable-message.html). +IronMQ push queues allow you to setup a queue that will push to an endpoint, rather than having to poll the endpoint. +[Here's the announcement for an overview](http://blog.iron.io/2013/01/ironmq-push-queues-reliable-message.html). ### Update a Message Queue From 85ee3fa47409769598922c3531ea05e60e0c3bde Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Fri, 30 Oct 2015 15:35:13 -0700 Subject: [PATCH 2/2] fixing del docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c71efb..d76294f 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ Default is 0 seconds. Maximum is 604,800 seconds (7 days). ### Delete a Message from a Queue ```javascript -queue.del(message_id, function(error, body) {}); +queue.del(message_id, {}, function(error, body) {}); ``` to batch delete multiple messages from a queue pass multiple message ids in an array to the del_multiple function