minio-dotnet
minio-dotnet copied to clipboard
ListenBucketNotificationsAsync only listens for the last event
I am using Minio 5.0. When I try to subscribe to bucket events with ListenBucketNotificationsAsync it only works for the last type of event.
Example:
var events = new List<EventType> { EventType.ObjectRemovedAll, EventType.ObjectCreatedPut, EventType.ObjectCreatedCopy }; var listenArgs = new ListenBucketNotificationsArgs() .WithBucket(_bucketName) .WithEvents(events); var listenObservable = _minIoClient.ListenBucketNotificationsAsync(listenArgs); _listenSubscription = listenObservable.Subscribe( notification => {.....
This piece of code only listens to ObjectCreatedCopy. Other events, like ObjectCreatedPut gots ignored. If I remove ObjectCreatedCopy so that the ObjectCreatedPut is the last event in the list, then the same code captures ObjectCreatedPut events (but not ObjectRemoved events)