Reference
Permissions
| To | You need |
|---|---|
| Open Message Queues | The feature odsl.queue_manager.manage (the feature policy extension.odsl.queue_manager, open to everyone by default) |
| See queues and read their messages | Read access to the queue service |
| Create, edit, send to, delete messages from, clear and move messages on a queue | Update access to the queue service for that queue |
| Delete a queue | Delete access to the queue service |
| See the log and statistics | Read access to the queue log service |
| Delete log entries | Delete access to the queue log service |
You only ever see your own company's queues.
Where things are kept
| What | Where |
|---|---|
| Queues | The queue service. Each queue is an Azure Service Bus queue named <environment>/<company>/<queue>, in the OpenDataDSL namespace with its own shared access rule (send and listen) behind the connection string, or in your own namespace with no connection string |
| Messages | In Service Bus only, for as long as the queue's retention |
| Queue log | The queue log service, one record per message the platform sent |
Platform calls
The screens use the queue service and the queue log service. The message functions are calls to the queue service, GET queue/v1?_function=<function>&queue=<queue name>, and use the queue's own connection:
| Function | Parameters | Returns |
|---|---|---|
details | The Service Bus settings and counts of the queue | |
peek | dlq (true for the dead letter queue), max (1 to 100), from (a sequence number), bodyLimit (characters of the body, 0 for all of it up to 1 MB) | The messages from that sequence number on, oldest first, unchanged |
purge | dlq, limit | deleted and more (call again while more is true) |
deleteMessages | dlq, seq (sequence numbers separated by commas, at most 500) | deleted, cancelled (scheduled messages), notFound |
resubmit | seq (optional: all dead letters when left out), limit | moved, more, notFound |
send | body (at most 64 KB), subject, contentType | messageId |
details and peek need read access, the others update access. A failed call returns the reason in the x-odsl-error header.
A message returned by peek:
| Field | What it is |
|---|---|
sequenceNumber | The number Service Bus gave the message on this queue |
messageId, subject, contentType, correlationId | As sent |
enqueuedTime, expiresAt, scheduledEnqueueTime | When it arrived, when it expires, when a scheduled message is due |
deliveryCount | How many times it was received without being completed |
state | ACTIVE, SCHEDULED or DEFERRED |
deadLetterReason, deadLetterErrorDescription, deadLetterSource | For a dead letter |
properties | The application properties |
size, body, bodyEncoding, bodyTruncated | The body as text; bodyEncoding is base64 when it is not text, bodyTruncated when only the first part was returned |
Extension contents
| Item | Id |
|---|---|
| Extension | odsl.queue_manager |
| View | Message Queues in the Deliver menu |
| Feature policy | extension.odsl.queue_manager, feature odsl.queue_manager.manage |
| Home page tasks | odsl.queue_manager.queues (Manage your message queues), odsl.queue_manager.deadletters (Check dead letter messages: opens the dead letter queue of the queue with the most dead letters) |
Good to know
| Topic | Detail |
|---|---|
| Counts | The counts come from Service Bus when the screen loads and after each action. Select Refresh to read them again |
| Messages being received | A message a receiver has taken but not completed yet is locked: it does not show in the list and cannot be deleted until its lock runs out |
| Long operations | Clearing, deleting and moving work for up to about 50 seconds per call; the screen calls again until everything is done |
| Retention changes | A new retention applies to messages sent after the change |
| Queues with a handler | They stay empty because the platform takes the messages straight away. Messages Service Bus could not forward are counted as failed forwards in the queue details; the screens do not list them |
| Your own messaging | Queues in it have the record fields messaging (the connection name), provider (servicebus, sqs, kafka or amqp) and location; send messaging when creating a queue to choose the connection, otherwise its name decides. The queue service adds ownMessaging, providerLabel, entity (the name in your messaging) and capabilities (what can be done with the queue), and has no connection for them. GET queue/v1?_function=messaging lists the connections with their queue name patterns (&queue=NAME adds the connection that name routes to). Functions your messaging cannot do are refused with the reason. See Keeping your message queues in your own messaging |
| Sending from outside the platform | For a queue in your own SQS, Kafka or AMQP broker, send in a script run elsewhere sends through PUT queue/v1?_function=send&queue=NAME with a JSON body {body, subject, contentType, messageId, correlationId, properties} (up to 256 KB) |
| Your applications' messages | The queue log does not include messages your applications send with the connection string |