0

What is 'Messages available' in the AWS SQS console?

I'm familiar with message queueing concepts, and 'messages in flight' seems obvious - that's the amount of unprocesed messages on the queue. But what does a message being 'available' mean? How can a message be available or not available? I've read the SQS docs and FAQ and can't find an answer.

enter image description here

Note I marked this as a possible dupe of Why do SqS messages sometimes remain in-flight on queue myself, but that question is focused on the definition of 'in flight' not 'available'.

mikemaccana
  • 110,530
  • 99
  • 389
  • 494
  • 2
    *"and 'messages in flight' seems obvious - that's the amount of unprocesed messages on the queue"* - no. Those are the message currently being processed. The "Messages available" are the messages that are there and nobody is even attempting to process them. – luk2302 Jun 29 '22 at 10:00
  • Damn. I think of MQ as a transport mechanism, and 'in flight' means 'in transit' not 'has arrived and is being processed'. I appreciate you're right (from [other answers](https://stackoverflow.com/questions/19792881/why-do-sqs-messages-sometimes-remain-in-flight-on-queue?rq=1)) but AWS's analogies here are way off what logic would dictate. @luk2302 do you want to add a reference and make this an answer? – mikemaccana Jun 29 '22 at 10:03

1 Answers1

1

Answering my own question to help others:

As @luk2302's comment mentions (Luk feel free to add your own answer), my understanding on 'in flight' was incorrect. AWS doesn't use the term 'in flight' in their API docs however those docs do have some useful references:

Messages Available seems to correspond to ApproximateNumberOfMessagesVisible in the API. This is

The number of messages available for retrieval from the queue.

Messages in flight is ApproximateNumberOfMessagesNotVisible

Messages are considered to be in flight if they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility window.

mikemaccana
  • 110,530
  • 99
  • 389
  • 494