mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 14:10:25 +03:00
Send kafka notification messages in batches when queue_dir is enabled (#18164)
Fixes #18124
This commit is contained in:
@@ -169,7 +169,7 @@ func (target *MQTTTarget) send(eventData event.Event) error {
|
||||
}
|
||||
|
||||
// SendFromStore - reads an event from store and sends it to MQTT.
|
||||
func (target *MQTTTarget) SendFromStore(eventKey string) error {
|
||||
func (target *MQTTTarget) SendFromStore(key store.Key) error {
|
||||
if err := target.init(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -180,7 +180,7 @@ func (target *MQTTTarget) SendFromStore(eventKey string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
eventData, err := target.store.Get(eventKey)
|
||||
eventData, err := target.store.Get(key.Name)
|
||||
if err != 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.
|
||||
@@ -195,7 +195,7 @@ func (target *MQTTTarget) SendFromStore(eventKey string) error {
|
||||
}
|
||||
|
||||
// Delete the event from store.
|
||||
return target.store.Del(eventKey)
|
||||
return target.store.Del(key.Name)
|
||||
}
|
||||
|
||||
// Save - saves the events to the store if queuestore is configured, which will
|
||||
|
||||
Reference in New Issue
Block a user