Send kafka notification messages in batches when queue_dir is enabled (#18164)

Fixes #18124
This commit is contained in:
Praveen raj Mani
2023-10-07 20:37:38 +05:30
committed by GitHub
parent 0de2b9a1b2
commit c27d0583d4
19 changed files with 438 additions and 90 deletions

View File

@@ -361,8 +361,8 @@ func (h *Target) Send(ctx context.Context, entry interface{}) error {
}
// SendFromStore - reads the log from store and sends it to kafka.
func (h *Target) SendFromStore(key string) (err error) {
auditEntry, err := h.store.Get(key)
func (h *Target) SendFromStore(key store.Key) (err error) {
auditEntry, err := h.store.Get(key.Name)
if err != nil {
if os.IsNotExist(err) {
return nil
@@ -376,7 +376,7 @@ func (h *Target) SendFromStore(key string) (err error) {
return
}
// Delete the event from store.
return h.store.Del(key)
return h.store.Del(key.Name)
}
// Cancel - cancels the target