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

@@ -349,9 +349,9 @@ func New(config Config) *Target {
}
// SendFromStore - reads the log from store and sends it to webhook.
func (h *Target) SendFromStore(key string) (err error) {
func (h *Target) SendFromStore(key store.Key) (err error) {
var eventData interface{}
eventData, err = h.store.Get(key)
eventData, err = h.store.Get(key.Name)
if err != nil {
if os.IsNotExist(err) {
return nil
@@ -372,7 +372,7 @@ func (h *Target) SendFromStore(key string) (err error) {
return err
}
// Delete the event from store.
return h.store.Del(key)
return h.store.Del(key.Name)
}
// Send the log message 'entry' to the http target.