Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 949 Bytes

functions-add-output-binding-java-code.md

File metadata and controls

17 lines (13 loc) · 949 Bytes
author ms.service ms.topic ms.date ms.author ms.custom
ggailey777
azure-functions
include
06/10/2022
glenga
devdivchpfy22

Now, you can use the new msg parameter to write to the output binding from your function code. Add the following line of code before the success response to add the value of name to the msg output binding.

:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/src/main/java/com/function/Function.java" range="34":::

When you use an output binding, you don't have to use the Azure Storage SDK code for authentication, getting a queue reference, or writing data. The Functions runtime and queue output binding do those tasks for you.

Your run method must now look like the following example:

:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/src/main/java/com/function/Function.java" range="17-38":::