This article is half-done without your Comment! *** Please share your thoughts via Comment ***
PostgreSQL 9.6 introduced a pg_notification_queue_usage() to monitor the notifications. If you want to send a notification to your system, you can use the function pg_notify(text, text).
Previously, people are monitoring the queue using LISTEN/NOTIFY, but where you can get the status only. Once the queue is half full, you will see warnings in the log file.
The function pg_notification_queue_usage() is very simple, and it is returning a value kind of percentage(%), so you can easily get to know about the queue usage.