CloudFlare Queue Acknowledgement doesn't seem to remove

Hey, we’re building a version of our SQS Consumer package for Cloudflare Queues:

We’ve got some initial polling stuff together that seems to be working great, however, we are having a problem with the acknowledgement API in that it doesn’t seem to be actually removing items from the queue, even when setting the visibility timeout to 10000, the message seems to come back in the next poll, with the message timeout increased, despite the call to the acknowledgement API returning that the message was actually acknowledged…

Anyone know what I’m doing wrong here?: cloudflare-queue-consumer/src/consumer.ts at main · bbc/cloudflare-queue-consumer · GitHub

Queue ID that we are using the test with: 61f29f0d8d3348e29fe432b1dc1f630f

As an update here, we think we’ve found a bug with the acks part of the request payload per Cloudflare API Documentation -

Right now, the acks field is being ignored. We’re pushing a hotfix today to address. This was an unfortunate outcome of a move from ack: string[]; retry: string[] and a bug in our request payload validation.

  "acks": [
    {
      "lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
    }
  ],
  "retries": [
    {
      "delay_seconds": 10,
      "lease_id": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2Q0JDLUhTNTEyIn0..Q8p21d7dceR6vUfwftONdQ.JVqZgAS-Zk7MqmqccYtTHeeMElNHaOMigeWdb8LyMOg.T2_HV99CYzGaQuhTyW8RsgbnpTRZHRM6N7UoSaAKeK0"
    }
  ]
1 Like

@nicholasgriffin - this should now be fixed and correct per the REST API docs!

2 Likes

Thanks! Just gave it a go and it does seem to be acknowledging as expected now.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.