Function amqp_get_rpc_reply

Synopsis

#include <librabbitmq/amqp.h>

amqp_rpc_reply_t amqp_get_rpc_reply(amqp_connection_state_t state)

Description

Get the last global amqp_rpc_reply

The API methods corresponding to most synchronous AMQP methods return a pointer to the decoded method result. Upon error, they return NULL, and we need some way of discovering what, if anything, went wrong. amqp_get_rpc_reply() returns the most recent amqp_rpc_reply_t instance corresponding to such an API operation for the given connection.

Only use it for operations that do not themselves return amqp_rpc_reply_t; operations that do return amqp_rpc_reply_t generally do NOT update this per-connection-global amqp_rpc_reply_t instance.

Parameters:

[ in ] state - the connection object

Return
the most recent amqp_rpc_reply_t:
See
amqp_simple_rpc_decoded()
Since
v0.1

Mentioned in

Source

Lines 1167-1169 in librabbitmq/amqp_socket.c. Line 1731 in librabbitmq/amqp.h.

amqp_rpc_reply_t amqp_get_rpc_reply(amqp_connection_state_t state) {
  return state->most_recent_api_result;
}





Add Discussion as Guest

Log in to DocsForge