Queue::claimItem does not return message creation time

Created on 16 October 2022, over 1 year ago
Updated 18 January 2023, over 1 year ago

Problem/Motivation

QueueInterface::claimItem() specifies

   *   If returned, the object will have at least the following properties:
   *   - data: the same as what passed into createItem().
   *   - item_id: the unique ID returned from createItem().
   *   - created: timestamp when the item was put into the queue.
   */

However we do not currently return a created time only a lease expiration time.

Steps to reproduce

Proposed resolution

Set timestamp as part of createItem() with submission to RabbitMQ daemon as a message property (this does not to my knowledge does not require a plugin or specific version of RabbitMQ)

Decode the message property as part of claimItem() and when not present return either 0 or now() (I'm inclined to lean to 0 as it is consistent)

Remaining tasks

Upload patch

User interface changes

None

API changes

Data model changes

Comply with Core API and include a 'created' property. If we don't know the created time return a value to ensure field is populated.

I believe this can be done without needing to bump the project major version.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cmlara

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024