Message with expired claim is still listed as claimed in v1.1 and v2 APIs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zaqar |
New
|
Undecided
|
Eva Balycheva |
Bug Description
I'm not sure it's a bug. At first glance it's a bug.
The problem occurs on Zaqar's API v1.1 and API v2 only.
On API v1 there's no such problem.
How to reproduce:
1. Post a message (with reasonably long TTL)
2. Claim it with short TTL
3. Wait for claim to expire
4. Get the message by id or list it in the queue. And see that the claim id is included in "href" field. Here's listing response, for example:
{"messages": [{"body": "somemessage", "age": 170, "href": "/v2/queues/
Changed in zaqar: | |
assignee: | nobody → Eva Balycheva (ubershy) |
in step4, we can use GET /v2/queues/ {queue_ id}/messages/ {message_ id} to get the message after claim expired. So the request works well.
And the "href" include a claim id in a unclaimed message. I think it is useful to indicate that whether this message is a new one or has been consumed before.
So IMO it's not a bug in this use case at least. But maybe it will confuse users more or less. Perhaps we could do it in a better way?