mirror of
https://github.com/minio/minio.git
synced 2025-11-23 19:17:43 -05:00
Send kafka notification messages in batches when queue_dir is enabled (#18164)
Fixes #18124
This commit is contained in:
@@ -335,7 +335,7 @@ func (target *NATSTarget) send(eventData event.Event) error {
|
||||
}
|
||||
|
||||
// SendFromStore - reads an event from store and sends it to Nats.
|
||||
func (target *NATSTarget) SendFromStore(eventKey string) error {
|
||||
func (target *NATSTarget) SendFromStore(key store.Key) error {
|
||||
if err := target.init(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -345,7 +345,7 @@ func (target *NATSTarget) SendFromStore(eventKey string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
eventData, eErr := target.store.Get(eventKey)
|
||||
eventData, eErr := target.store.Get(key.Name)
|
||||
if eErr != nil {
|
||||
// The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
|
||||
// Such events will not exist and wouldve been already been sent successfully.
|
||||
@@ -359,7 +359,7 @@ func (target *NATSTarget) SendFromStore(eventKey string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return target.store.Del(eventKey)
|
||||
return target.store.Del(key.Name)
|
||||
}
|
||||
|
||||
// Close - closes underneath connections to NATS server.
|
||||
|
||||
Reference in New Issue
Block a user