int port,
const char * const path,
const char * const topic,
+ int ring_buf_size,
int secure,
const char * const cert_file_path,
const char * const key_file_path,
rc = event_handler_initialize(event_api_url,
throt_api_url,
source_ip,
+ ring_buf_size,
secure,
cert_file_path,
key_file_path,
* @param port The API's port.
* @param path The optional path (may be NULL).
* @param topic The optional topic part of the URL (may be NULL).
+ * @param ring_buf_size Ring buffer size (>=100) ~ Avg Messages in 1hr
* @param secure Whether to use HTTPS (0=HTTP, 1=HTTPS).
* @param cert_file_path Path to client certificate file
* @param key_file_path Path to client key file
int port,
const char * const path,
const char * const topic,
+ int ring_buf_size,
int secure,
const char * const cert_file_path,
const char * const key_file_path,
/* Sanity check. */
/***************************************************************************/
assert(jbuf->depth == 0);
+ if( jbuf->offset >= max_size ){
+ EVEL_ERROR("Event exceeded size limit %d", max_size);
+ assert(0);
+ }
EVEL_EXIT();
* @param[in] throt_api_url
* The URL where the Throttling API is expected to be.
* @param[in] source_ip Source IP of VES Agent
+ * @param[in] ring_buf_size Initial size of ring buffer
* @param[in] secure Whether Using http or https
* @param[in] cert_file_path Path to Client Certificate file
* @param[in] key_file_path Path to Client key file
EVEL_ERR_CODES event_handler_initialize(const char * const event_api_url,
const char * const throt_api_url,
const char * const source_ip,
+ int ring_buf_size,
int secure,
const char * const cert_file_path,
const char * const key_file_path,
/* Initialize a message ring-buffer to be used between the foreground and */
/* the thread which sends the messages. This can't fail. */
/***************************************************************************/
+ if( ring_buf_size < EVEL_EVENT_BUFFER_DEPTH )
+ {
+ log_error_state("Warning: Failed to initialize Ring buffer size to %d. "
+ ring_buf_size);
+ goto exit_label;
+ }
ring_buffer_initialize(&event_buffer, EVEL_EVENT_BUFFER_DEPTH);
/***************************************************************************/
* @param[in] throt_api_url
* The URL where the Throttling API is expected to be.
* @param[in] source_ip Source IP of VES Agent
+ * @param[in] ring_buf_size Initialization size of Ring Buffer
* @param[in] secure Whether Using http or https
* @param[in] cert_file_path Path to Client Certificate file
* @param[in] key_file_path Path to Client key file
EVEL_ERR_CODES event_handler_initialize(const char * const event_api_url,
const char * const throt_api_url,
const char * const source_ip,
+ int ring_buf_size,
int secure,
const char * const cert_file_path,
const char * const key_file_path,