minio-dotnet icon indicating copy to clipboard operation
minio-dotnet copied to clipboard

ListenBucketNotificationsAsync only listens for the last event

Open poganytamas opened this issue 1 year ago • 0 comments

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)

poganytamas avatar Aug 25 '23 13:08 poganytamas