AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
|
Utilities for consuming RabbitMQ messages. More...
#include <amqp.h>
Go to the source code of this file.
Functions | |
int | amqp_listen_retry (const char *hostname, int port, const char *bindingkey, amqp_connection_state_t *conn, const unsigned int tries) |
Setup a consumer for a specific queue. More... | |
int | amqp_consume (amqp_connection_state_t *conn, amqp_envelope_t *envelope) |
Consume one message from a connection object. More... | |
Utilities for consuming RabbitMQ messages.
Definition in file amqp_listen.h.
int amqp_consume | ( | amqp_connection_state_t * | conn, |
amqp_envelope_t * | envelope | ||
) |
Consume one message from a connection object.
conn | The connection object to use |
envelope | a preallocated envelope to store the message |
Definition at line 90 of file amqp_listen.c.
int amqp_listen_retry | ( | const char * | hostname, |
int | port, | ||
const char * | bindingkey, | ||
amqp_connection_state_t * | conn, | ||
const unsigned int | tries | ||
) |
Setup a consumer for a specific queue.
hostname | The host of the RabbitMQ server |
port | The port of the RabbitMQ server |
bindingkey | the queue |
conn | the connection object to initialize |
tries | the number of tries |
This function will try to connect tries
number of times, with a doubled delay everytimes something fails in the setup. In case of failure, it will log an error and terminate the program.
Definition at line 17 of file amqp_listen.c.