liveBook · Manning

Message queue API

As explained in Just Use Postgres!

A message queue API is an interface for publishing, reading, and managing messages in a queue.

A message queue API provides a higher-level interface for publishing, reading, and managing messages while relying on database tables and SQL underneath. In Postgres, it can be exposed through stored procedures or client libraries for specific programming languages. section 11.1

A Postgres-backed queue can combine:

  • Strictly typed fields such as message_id and created_time for producer-side data integrity. section 11.1
  • Flexible json or jsonb payloads for producer-defined message content. section 11.1
  • Transactional recording of a business operation and the message it produces as one atomic action. section 11.1

Service-registration queue

A DMV check-in terminal can record a visitor's successful registration and enqueue an event notifying the visitor when a representative is ready. This fits when the registration and message must be committed atomically. section 11.1

How Just Use Postgres! covers it

How deep it goes
Explains storage types and API layers, but stops short of implementation code or operational procedures.
Examples
Uses a DMV check-in event to illustrate atomic registration and queue insertion.
What you can do after
Evaluate whether Postgres is suitable for a queue when transactional atomicity is a central requirement.
How it connects
Connects message queue APIs with Postgres tables, SQL, stored procedures, client libraries, JSON, and transactions.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Just Use Postgres!. The section links point to the parts of the book it draws on.