Skip to main content

Queues

The Queues tab lists your company's queues. Each row shows how many messages are waiting (Active), how many could not be delivered (Dead letter), how many are Scheduled for later, how much space they take, and the queue's retention and timeout. The cards at the top add these up for all your queues: a red Dead letter messages card means something needs looking at.

Select a count to go straight to those messages, or select a row to see the details of the queue.


Creating a queue​

Northgate wants a new queue for curve quality alerts that its operations dashboard will read. Priya selects New queue.

The New queue form

FieldExampleNotes
Namenge-curve-alertsLetters, numbers, -, . and _, starting and ending with a letter or number. It cannot be changed later
DescriptionCurve quality alerts for the operations dashboardWhat the queue is for
HandlerNoneSee Handlers
RetentionP2DHow long a message waits to be received before it expires, as an ISO 8601 duration: P14D is 14 days (the default), PT6H is 6 hours
TimeoutPT1MHow long a receiver has to process a message before others can receive it again. The default is 1 minute, the most is 5 minutes (PT5M)

Select Create. The queue is created in Service Bus straight away, with its own connection string.

note

How many queues you can have depends on your licence. Creating one more than you are allowed fails with a message saying the queue quota is exceeded.


Handlers​

HandlerWhat happens to the messagesUse it for
NoneThey wait on the queue until your own application receives themSending data out to your systems (ETRM, risk, dashboards)
triggerThe platform receives each message as it arrives and runs the automations on the queue's message eventLoading data sent by other systems, see Loading data from a message queue
loaderThe platform receives each message and loads it with the data loaderBatches of objects in the platform's load format

A queue with a handler stays empty: its messages are forwarded to the platform as soon as they arrive. If Service Bus cannot forward a message, it keeps it apart as a failed forward; the queue details show how many there are.


Queues in your own messaging​

Your company can keep queues in its own messaging instead of the OpenDataDSL namespace: Azure Service Bus namespaces, Amazon SQS, Apache Kafka clusters or AMQP 1.0 brokers, as many connections as it needs. Your administrators add them in the Custom Infrastructure extension and say which queue names go to each one, for example trading-* to one Kafka cluster. From then on:

In the OpenDataDSL namespaceIn your own messaging
New queuesQueues no connection's names matchCreated in the connection their name matches (you can choose another when you create the queue): with the same name in Service Bus, as odsl-prod-<queue> in SQS, or odsl.prod.<queue> in Kafka and AMQP (the prefix can be changed)
Connecting your applicationsWith the queue's connection stringAs your applications connect to the rest of your messaging, with their own identity or user: there is no connection string
Handlerstrigger and loader are availableNot available: keep the queues that load data or trigger processes in the OpenDataDSL namespace
Everything elseMessages, dead letters, clearing, moving, test messages, the log and statisticsWhat your messaging can do, see what OpenDataDSL can do with your queues. For example SQS has no message view, as reading an SQS message changes it

A note at the top of the Queues tab lists your connections and the queue names that go to each, and queues in a connection have its name as a chip, such as aws-alerts. In the New queue dialog, the Connection follows the name as you type it; choose another to override it. A queue stays in the connection it was created in: to move one, delete it and create it again.

The New queue dialog choosing kafka-trading for trading-gas-curves

A queue in Northgate&#39;s aws-alerts connection to Amazon SQS

Instead of the connection string, the details of a queue in your messaging give its name there, its settings in your messaging, how to connect, and code for that service's own client library: DefaultAzureCredential for Service Bus, boto3 or the AWS SDK for SQS, confluent-kafka, kafkajs or Confluent.Kafka for Kafka, and Qpid Proton, rhea or AMQP.Net Lite for AMQP.


The queue details​

Selecting a queue shows its details below the list.

The details of nge-etrm-prices: settings, Service Bus details, connection string and code

PartWhat it shows
ButtonsMessages, Dead letters, Send test message, Log and Statistics for this queue, Edit and Delete
SettingsThe name, the full name in Service Bus (<environment>/<company>/<queue>), the handler, retention and timeout
Service BusStatus, when the queue was created, last updated and last used, the messages on it, its size, how long messages live and what happens when they expire, the lock duration and the most deliveries before a message is dead lettered
Connection stringHidden key by default: the eye button shows it, the clipboard button copies it
Use the queue from codeReady to use code to send and receive with ODSL, Python, JavaScript or C#

Connecting your applications​

Your applications use the queue's connection string with any Azure Service Bus client library. The string gives send and receive rights on this one queue only.

Python code to send and receive with the queue

caution

Anyone who has the connection string can read and send messages on the queue. Keep it in a secret store, not in code or email, and do not paste it into a chat.

A receiver should complete each message once it has processed it: until then the message stays on the queue and becomes available again when the timeout runs out. After 10 deliveries without being completed, Service Bus moves the message to the dead letter queue.


Editing a queue​

Select Edit to change the description, handler, retention or timeout. The changes apply to the queue in Service Bus as soon as you save. A new retention only applies to messages sent after the change.

Removing the handler stops the platform receiving the messages: from then on they wait on the queue for your own application.


Deleting a queue​

Select Delete and type the queue name to confirm. The queue and every message on it are deleted. Applications that use its connection string stop working, and automations on the queue no longer run. The queue log entries are kept.


Next​

Messages: look at what is waiting on a queue and deal with dead letters.