Changeset 975


Ignore:
Timestamp:
11/28/13 09:32:16 (10 years ago)
Author:
jripsl
Message:
  • remove RabbitMQ entities creation from the producer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Monitoring/CNClient/send_AMQP_msg.c

    r973 r975  
    388388  die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel"); 
    389389 
    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-delete 
    395   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 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"); 
     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"); 
    400400 
    401401  {  
Note: See TracChangeset for help on using the changeset viewer.