diff --git a/src/functions/pipeBinding.js b/src/functions/pipeBinding.js
index 6c32e2c7a27dbc26b77998fb3955b3df6d77f894..8df6fcb81ede6dc67d9914475b1f7ec4e0ed1289 100644
--- a/src/functions/pipeBinding.js
+++ b/src/functions/pipeBinding.js
@@ -63,7 +63,11 @@ export const handlePipeBinding = (pipeMapping, editor) => {
       let position = line.from;
       let pipeNameUserGiven = pipe.pipeName;
       let pipeNameDeklaration = makeValidConstName(pipeNameUserGiven);
-      let insertCode = `\t\tconst ${pipeNameDeklaration} = "${pipeNameUserGiven}";\n\t\tawait channel.assert${pipe.pipeType}(${pipeNameDeklaration}, {\n\t\t\tdurable: false\n\t\t});\n`;
+      let insertCode = `\t\tconst ${pipeNameDeklaration} = "${pipeNameUserGiven}";\n\t\tchannel.assert${
+        pipe.pipeType === "Queue" ? "Queue" : "Exchange"
+      }(${pipeNameDeklaration}, ${
+        pipe.pipeType === "Topic" ? `"topic", ` : ""
+      }{\n\t\t\tdurable: false\n\t\t});\n`;
       let transaction = editor.state.update({
         changes: {
           from: position,