Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

restart replication if RabbitMQ connection closed https://github.com/google/go-cloud/issues/2958

Konstantin Lebedev0cfed8c3cb8c
diff --git a/docker/notification.toml b/docker/compose/notification.toml
similarity index 100%
rename from docker/notification.toml
rename to docker/compose/notification.toml
diff --git a/docker/replication.toml b/docker/compose/replication.toml
similarity index 100%
rename from docker/replication.toml
rename to docker/compose/replication.toml
diff --git a/weed/replication/sub/notification_gocdk_pub_sub.go b/weed/replication/sub/notification_gocdk_pub_sub.go
index 413c0e3cf1..1d7fe520bc 100644
--- a/weed/replication/sub/notification_gocdk_pub_sub.go
+++ b/weed/replication/sub/notification_gocdk_pub_sub.go
@@ -113,6 +113,10 @@ func (k *GoCDKPubSubInput) Initialize(configuration util.Configuration, prefix s
func (k *GoCDKPubSubInput) ReceiveMessage() (key string, message *filer_pb.EventNotification, onSuccessFn func(), onFailureFn func(), err error) {
msg, err := k.sub.Receive(context.Background())
if err != nil {
+ var conn *amqp.Connection
+ if k.sub.As(&conn) && conn.IsClosed() {
+ glog.Fatalln(err)
+ }
return
}
onFailureFn = func() {