From 9d1a6d2d514737ab2da7e17fbbb562ed0f21b58b Mon Sep 17 00:00:00 2001 From: marktwtn Date: Fri, 6 Dec 2019 12:36:46 +0800 Subject: [PATCH] fix: Avoid queue missing error Declare queue in the remote worker source code to avoid queue missing error when the new RabbitMQ broker is created and the remote worker is activated right after it. Close #209. --- src/remote_worker.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/remote_worker.c b/src/remote_worker.c index f33b324..d75627a 100644 --- a/src/remote_worker.c +++ b/src/remote_worker.c @@ -47,6 +47,9 @@ int main(int argc, char *const *argv) if (!connect_broker(&conn, hostIP)) goto fail; + if (!declare_queue(&conn, 1, "incoming_queue")) + goto fail; + if (!set_consuming_queue(&conn, 1, "incoming_queue")) goto fail;