适用于 Azure Functions 的 RabbitMQ 绑定概述RabbitMQ bindings for Azure Functions overview

备注

仅高级和专用计划完全支持 RabbitMQ 绑定。The RabbitMQ bindings are only fully supported on Premium and Dedicated plans. 不支持消耗。Consumption is not supported.

Azure Functions 通过触发器和绑定RabbitMQ 集成。Azure Functions integrates with RabbitMQ via triggers and bindings. 借助 Azure Functions RabbitMQ 扩展,你可以通过 Functions 使用 RabbitMQ API 来发送和接收消息。The Azure Functions RabbitMQ extension allows you to send and receive messages using the RabbitMQ API with Functions.

操作Action 类型Type
当 RabbitMQ 消息进入队列时运行函数Run a function when a RabbitMQ message comes through the queue 触发器Trigger
发送 RabbitMQ 消息Send RabbitMQ messages 输出绑定Output binding

添加到 Functions 应用Add to your Functions app

若要开始使用此扩展进行开发,请确保先设置 RabbitMQ 终结点To get started with developing with this extension, make sure you first set up a RabbitMQ endpoint. 若要了解有关 RabbitMQ 的详细信息,请查看其“入门”页To learn more about RabbitMQ, check out their getting started page.

Functions 3.x 及更高版本Functions 3.x and higher

使用触发器和绑定需要引用相应的包。Working with the trigger and bindings requires that you reference the appropriate package. NuGet 包用于 .NET 类库,而扩展捆绑包用于其他所有应用程序类型。The NuGet package is used for .NET class libraries while the extension bundle is used for all other application types.

语言Language 添加方式...Add by... 备注Remarks
C#C# 安装 NuGet 包版本 4.xInstalling the NuGet package, version 4.x
C# 脚本、Java、JavaScript、PowerShellC# Script, Java, JavaScript, PowerShell 注册扩展捆绑包Registering the extension bundle 建议将 [Azure Tools 扩展]用于 Visual Studio Code。The Azure Tools extension is recommended to use with Visual Studio Code.
C# 脚本(Azure 门户中仅限联机)C# Script (online-only in Azure portal) 添加绑定Adding a binding 若要更新现有绑定扩展而不必重新发布函数应用,请参阅更新扩展To update existing binding extensions without having to republish your function app, see Update your extensions.

Functions 1.x 和 2.xFunctions 1.x and 2.x

Functions 1.x 和 2.x 不支持 RabbitMQ 绑定扩展。RabbitMQ Binding extensions are not supported for Functions 1.x and 2.x. 请使用 Functions 3.x 及更高版本。Please use Functions 3.x and higher.

后续步骤Next steps