@@ -20,14 +20,15 @@ See the Apache License Version 2.0 for the specific language governing permissio
2020#include < future>
2121#include < thread>
2222#include < algorithm>
23- #include " constants.hpp"
24- #include " utils.hpp"
25- #include " storage/event_store.hpp"
26- #include " payload/payload.hpp"
27- #include " payload/self_describing_json.hpp"
28- #include " cracked_url.hpp"
29- #include " http/http_request_result.hpp"
30- #include " http/http_client.hpp"
23+ #include " ../constants.hpp"
24+ #include " ../utils.hpp"
25+ #include " ../storage/event_store.hpp"
26+ #include " ../payload/payload.hpp"
27+ #include " ../payload/self_describing_json.hpp"
28+ #include " ../cracked_url.hpp"
29+ #include " ../http/http_request_result.hpp"
30+ #include " ../http/http_client.hpp"
31+ #include " retry_delay.hpp"
3132
3233using std::string;
3334using std::thread;
@@ -91,12 +92,12 @@ class Emitter {
9192 * @param uri The URI to send events to
9293 * @param method The request type to use (GET or POST)
9394 * @param protocol The protocol to use (http or https)
94- * @param send_limit The maximum amount of events to send at a time
95+ * @param batch_size The maximum amount of events to send at a time
9596 * @param byte_limit_post The byte limit when sending a POST request
9697 * @param byte_limit_get The byte limit when sending a GET request
9798 * @param event_store Defines the database to use for event queue
9899 */
99- Emitter (const string & uri, Method method, Protocol protocol, int send_limit ,
100+ Emitter (const string & uri, Method method, Protocol protocol, int batch_size ,
100101 int byte_limit_post, int byte_limit_get, shared_ptr<EventStore> event_store);
101102
102103 /* *
@@ -105,13 +106,13 @@ class Emitter {
105106 * @param uri The URI to send events to
106107 * @param method The request type to use (GET or POST)
107108 * @param protocol The protocol to use (http or https)
108- * @param send_limit The maximum amount of events to send at a time
109+ * @param batch_size The maximum amount of events to send at a time
109110 * @param byte_limit_post The byte limit when sending a POST request
110111 * @param byte_limit_get The byte limit when sending a GET request
111112 * @param event_store Defines the database to use for event queue
112113 * @param http_client Unique pointer to a custom HTTP client to send GET and POST requests with
113114 */
114- Emitter (const string & uri, Method method, Protocol protocol, int send_limit ,
115+ Emitter (const string & uri, Method method, Protocol protocol, int batch_size ,
115116 int byte_limit_post, int byte_limit_get, shared_ptr<EventStore> event_store, unique_ptr<HttpClient> http_client);
116117 ~Emitter ();
117118
@@ -152,11 +153,11 @@ class Emitter {
152153 Method get_method () const { return m_method; }
153154
154155 /* *
155- * @brief Get the send limit .
156+ * @brief Get the batch size .
156157 *
157158 * @return unsigned int The maximum amount of events to send at a time
158159 */
159- unsigned int get_send_limit () const { return m_send_limit ; }
160+ unsigned int get_batch_size () const { return m_batch_size ; }
160161
161162 /* *
162163 * @brief Get the byte limit for GET.
@@ -208,7 +209,7 @@ class Emitter {
208209 Method m_method;
209210 shared_ptr<EventStore> m_event_store;
210211 unique_ptr<HttpClient> m_http_client;
211- unsigned int m_send_limit ;
212+ unsigned int m_batch_size ;
212213 unsigned int m_byte_limit_get;
213214 unsigned int m_byte_limit_post;
214215
@@ -222,6 +223,7 @@ class Emitter {
222223 EmitterCallback m_callback;
223224 EmitStatus m_callback_emit_status;
224225 map<int , bool > m_custom_retry_for_status_codes;
226+ RetryDelay m_retry_delay;
225227
226228 void run ();
227229 void do_send (const list<EventRow> &event_rows, list<HttpRequestResult> *results);
0 commit comments