What does errno 122 (ENOMSG) mean?

 
Could be also:
ConstantTypeOS
ERROR_INSUFFICIENT_BUFFERWin32 errorWindows
EOPNOTSUPPerrnoSolaris
KERNEL_DATA_INPAGE_ERRORBugCheck CodeWindows
Previous Next
ENOBUFS ENOPROTOOPT

ENOMSG

ENOMSG is a UCRT POSIX compatibility constant associated with System V message selection. A queue can still exist and contain messages, while a receive operation finds no message matching the requested type or selection rule.

The distinction matters because the right next step depends on receive mode. In a nonblocking receive, no matching message is normally a state to handle without destroying the queue or reconnecting a peer. In a blocking design, investigate the producer, selection type, ordering assumptions, and timeout policy instead of converting the condition into a generic transport error.

Check the selection contract

  • Record the requested message type and the exact receive flags.
  • Check whether producers publish that type, whether another consumer can take it first, and whether type filtering is intentional.
  • Keep queue lifetime errors separate: a removed queue is an EIDRM case, not ENOMSG.

On Windows, the constant is part of the UCRT POSIX supplement. The producer may be a portability layer or application-level queue abstraction, so identify that layer before applying System V-specific recovery logic.

References


Looking for a different code? Search another status or error code.