emqx/changes/ce/feat-12561.en.md
Serge Tupchii cb5fdb3c79 fix: rework In-flight / Mqueue API
- use timestamp 'position' to find the next chunk of data
- add 'start' position to response meta
- sort In-flight messages by insertion time
- sort Mqueue messages by priority
2024-03-20 15:25:33 +02:00

966 B

Implement HTTP APIs to get the list of client's in-flight and mqueue messages.

To get the first chunk of data:

  • GET /clients/{clientid}/mqueue_messages?limit=100
  • GET /clients/{clientid}/inflight_messages?limit=100

Alternatively:

  • GET /clients/{clientid}/mqueue_messages?limit=100&position=none
  • GET /clients/{clientid}/inflight_messages?limit=100&position=none

To get the next chunk of data:

  • GET /clients/{clientid}/mqueue_messages?limit=100&position={position}
  • GET /clients/{clientid}/inflight_messages?limit=100&position={position}

Where {position} is a value (opaque string token) of "meta.position" field from the previous response.

Mqueue messages are ordered according to their priority and queue (FIFO) order: from higher priority to lower priority. By default, all messages in Mqueue have the same priority of 0.

In-flight messages are ordered by time at which they were inserted to the in-flight storage (from older to newer messages).