Skip to content

v2.2.0

Choose a tag to compare

@mcweba mcweba released this 03 May 08:06
· 1283 commits to master since this release

Changes

The following queue operations have been renamed:

Queue operation old Queue operation new
getListRange getQueueItems
addItem addQueueItem
deleteItem deleteQueueItem
getItem getQueueItem
replaceItem replaceQueueItem

The "old" queue operations can still be used, but a warning will be logged to use the new queue operation. See example below:

WARNUNG: Legacy queue operation used. This may be removed in future releases. Use 'getQueueItems' instead of 'getListRange'

New Features

The following new features have been introduced in this release.

New Queue operations

Queue operation Description
getQueues Get the names of all active queues
getQueuesCount Get the count of all active queues
getQueueItemsCount Get the queue item count of a single queue

RedisquesAPI util

For easier work with the Redisques module, the RedisquesAPI class has been introduced. See:

org.swisspush.redisques.util.RedisquesAPI

To execute a replaceQueueItem operation for example, the following json object has to be sent to Redisques:

{
    "operation": "replaceQueueItem",
    "payload": {
        "queuename": "myQueue",
        "buffer": "newQueueContent",
        "index": 99
    }
}

The same json object can be created by using the following RedisquesAPI helper method:

JsonObject operation = RedisquesAPI.buildReplaceItemOperation("myQueue", 99, "newQueueContent");