|
AiCPlayer
Interface of aic vm - for rendering aspect, sensors, video records
|
Listen on AMQP queues and consume messages. More...
#include <stdint.h>#include <stdio.h>#include <unistd.h>#include "logger.h"#include "config_env.h"#include "amqp_listen.h"#include <amqp.h>#include <amqp_framing.h>#include <amqp_tcp_socket.h>
Go to the source code of this file.
Macros | |
| #define | LOG_TAG "amqp_listen" |
| #define | RETRY |
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... | |
Listen on AMQP queues and consume messages.
Definition in file amqp_listen.c.
| #define LOG_TAG "amqp_listen" |
Definition at line 15 of file amqp_listen.c.
| #define RETRY |
| 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.


1.8.6