Changeset 975 for trunk/Monitoring/CNClient
- Timestamp:
- 11/28/13 09:32:16 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Monitoring/CNClient/send_AMQP_msg.c
r973 r975 388 388 die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel"); 389 389 390 // amqp_exchange_declare(conn, 1, amqp_cstring_bytes("myexchange"), amqp_cstring_bytes("fanout"), 0, 0, amqp_empty_table); // fanout exchange (i.e. without routing key)391 amqp_exchange_declare(conn, 1, amqp_cstring_bytes("myexchange"), amqp_cstring_bytes("direct"), 0, 0, amqp_empty_table); // direct exchange (i.e. to be used with routing key)392 die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring exchange");393 394 amqp_queue_declare(conn, 1, amqp_cstring_bytes("myqueue"), 0, 1, 0, 0, amqp_empty_table); // durable && no auto-delete395 die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring queue");396 397 // amqp_queue_bind(conn, 1, amqp_cstring_bytes("myqueue"), amqp_cstring_bytes("myexchange"), amqp_cstring_bytes(""), amqp_empty_table); //no need for binding key as we use the fanout exchange type398 amqp_queue_bind(conn, 1, amqp_cstring_bytes("myqueue"), amqp_cstring_bytes("myexchange"), amqp_cstring_bytes("myroutingkey"), amqp_empty_table); //we use a binding key here as we use the direct exchange type399 die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding");390 // old amqp_exchange_declare(conn, 1, amqp_cstring_bytes("myexchange"), amqp_cstring_bytes("fanout"), 0, 0, amqp_empty_table); // fanout exchange (i.e. without routing key) 391 //amqp_exchange_declare(conn, 1, amqp_cstring_bytes("myexchange"), amqp_cstring_bytes("direct"), 0, 0, amqp_empty_table); // direct exchange (i.e. to be used with routing key) 392 //die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring exchange"); 393 394 //amqp_queue_declare(conn, 1, amqp_cstring_bytes("myqueue"), 0, 1, 0, 0, amqp_empty_table); // durable && no auto-delete 395 //die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring queue"); 396 397 // old amqp_queue_bind(conn, 1, amqp_cstring_bytes("myqueue"), amqp_cstring_bytes("myexchange"), amqp_cstring_bytes(""), amqp_empty_table); //no need for binding key as we use the fanout exchange type 398 //amqp_queue_bind(conn, 1, amqp_cstring_bytes("myqueue"), amqp_cstring_bytes("myexchange"), amqp_cstring_bytes("myroutingkey"), amqp_empty_table); //we use a binding key here as we use the direct exchange type 399 //die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding"); 400 400 401 401 {
Note: See TracChangeset
for help on using the changeset viewer.