Guest User

Untitled

a guest
Jun 20th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <SimpleAmqpClient/SimpleAmqpClient.h>
  2.  
  3. int main()
  4. {
  5. /*explicit Channel(const std::string &host, int port,
  6. const std::string &username, const std::string &password,
  7. const std::string &vhost, int frame_max);*/
  8.  
  9. AmqpClient::Channel* connection = new AmqpClient::Channel("127.0.0.1", 5672, "guest", "guest", "/", 131072);
  10. connection->DeclareExchange("exchange", "direct");
  11. connection->DeclareQueue("queue");
  12.  
  13. AmqpClient::BasicMessage::ptr_t message = AmqpClient::BasicMessage::Create("Hello World");
  14.  
  15. connection->BasicPublish("exchange", "", message, true, false);
  16.  
  17. return 0;
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment