- /* create the exchange */
- if (conf->exchange_type != NULL)
- {
- amqp_exchange_declare_ok_t *ed_ret;
-
- ed_ret = amqp_exchange_declare (conf->connection,
- /* channel = */ CAMQP_CHANNEL,
- /* exchange = */ amqp_cstring_bytes (conf->exchange),
- /* type = */ amqp_cstring_bytes (conf->exchange_type),
- /* passive = */ 0,
- /* durable = */ 0,
- /* auto_delete = */ 1,
- /* arguments = */ AMQP_EMPTY_TABLE);
- if ((ed_ret == NULL) && camqp_is_error (conf))
- {
- char errbuf[1024];
- ERROR ("amqp plugin: amqp_exchange_declare failed: %s",
- camqp_strerror (conf, errbuf, sizeof (errbuf)));
- camqp_close_connection (conf);
- return (-1);
- }
- }
-
- DEBUG ("amqp plugin: queue = %s; exchange = %s; routing_key = %s;",
- conf->queue, conf->exchange, CONF (conf, routingkey));
-