~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/rabbitmq/rabbitmq_handler.h

  • Committer: Marcus Eriksson
  • Date: 2011-03-30 19:50:29 UTC
  • mto: This revision was merged to the branch mainline in revision 2263.
  • Revision ID: krummas@gmail.com-20110330195029-3l4r5kc2cr57i40l
Add RabbitMQ documentation and update the rabbitmq plugin to reconnect etc if the server goes away

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
  const std::string &username;
67
67
  const std::string &password;
68
68
  const std::string &virtualhost;
 
69
  const std::string &exchange;
 
70
  const std::string &routingKey;
69
71
public:
70
72
  /**
71
73
   * @brief
87
89
                  const in_port_t port, 
88
90
                  const std::string &username, 
89
91
                  const std::string &password, 
90
 
                  const std::string &virtualhost)
 
92
                  const std::string &virtualhost,
 
93
                  const std::string &exchange,
 
94
                  const std::string &routingKey)
91
95
    throw(rabbitmq_handler_exception);
92
96
 
93
97
  ~RabbitMQHandler();
101
105
   *
102
106
   * @param[in] message the message to send
103
107
   * @param[in] length the length of the message
104
 
   * @param[in] exchangeName name of the exchange to publish to
105
 
   * @param[in] routingKey the routing key to use
106
108
   * @throw exception if there is a problem publishing
107
109
   */
108
110
  void publish(void *message, 
109
 
               const int length, 
110
 
               const std::string &exchangeName, 
111
 
               const std::string &routingKey)
 
111
               const int length)
112
112
    throw(rabbitmq_handler_exception);
113
113
 
 
114
  void reconnect() throw(rabbitmq_handler_exception);
 
115
  void disconnect() throw(rabbitmq_handler_exception);
114
116
 
115
117
private:
116
118
  /**
126
128
   * @throw exception with the message unless the command was successful
127
129
   */
128
130
  void handleAMQPError(amqp_rpc_reply_t x, std::string context) throw(rabbitmq_handler_exception);
 
131
 
 
132
  void connect() throw(rabbitmq_handler_exception);
 
133
 
129
134
};
130
135
 
131
136
} /* namespace drizzle_plugin */