Peek, Touch and Release

ironmq
blank

IronMQ now supports three new operations: peek, touch and release. These operations give you greater control over handling your messages and here's a brief explanation of each.

 

Table of Contents:

Achieve Cloud Elasticity with Iron

Speak to us to find how you can achieve cloud elasticity with a serverless messaging queue and background task solution with free handheld support.

A little background on the message lifecycle

First off, let's discuss the typical message lifecycle.

  1. POST message to a queue.
  2. GET message from the queue - this reserves it.
  3. DELETE the message from the queue once you're done with it.

During the 2nd phase of the lifecycle, the GET phase, a message is reserved for a period of time defined by the "timeout" parameter (default is 60 seconds). If the message is not DELETEd before the end of the timeout, it will be placed back on the queue and become available again for the next GET.

Peek

Peek allows you to get messages off the queue without reserving them. Peek will not reserve the message and it will therefore remain available for the next peek or get operation. You can use this if you need to see if any messages are available.

Docs for peek.

Untitled design

Iron.io Serverless Tools

Speak to us to learn how IronWorker and IronMQ are essential products for your application to become cloud elastic.

Touch

Touching a reserved message extends its timeout by the duration specified when the message was created / POSTed. This is useful if your processing time is taking longer than expected and you want some more time to finish.

Docs for touch.

Release

Releasing a reserved message un-reserves the message and puts it back on the queue as if the message had timed out. This is useful if for some reason you can't process the message right away, you can put it back on the queue for another process to pick up. You can also supply a "delay" parameter.

Docs for release.

Iron

Unlock the Cloud with Iron.io

Find out how IronWorker and IronMQ can help your application obtain the cloud with fanatical customer support, reliable performance, and competitive pricing.

Leave a Comment





This site uses Akismet to reduce spam. Learn how your comment data is processed.