HomeDevCentral

`mq get` to implement basic.get, better error handling

Description

mq get to implement basic.get, better error handling

  • mq get **

mq get <queue> [-noack]

Implements the basic.get AMQP method.

If -noack is omitted, you must confirm delivery with a mq ack
(which is not implemented currently).

If -noack is included, messages will be removed from the queue
upon delivery.

  • Better error handling **

librabbitmq is far to be bulletproof: first, it doesn't warranty
non blocking operation; secondly, it doesn't check variables and
is happy to try operations on null pointers, leading to crashes
when we close the connection server-side.

We so need to add safeguard in our own library code to mark
connection as disconnected when a 320 CLOSE CONNECTION occurs or to
try to determine if the next operation would be non blocking.

Details

Provenance
derecksonAuthored on Dec 12 2015, 13:01
Parents
rRABBITMQTCLd6898d527028: New helper function: is_mq_connected
Branches
Unknown
Tags
Unknown