简体   繁体   English

是否可以在 azure function 应用程序中创建主题订阅?

[英]Is it possible to create a topic subscription in an azure function app?

I do know we can create a subscription in ASB, but I wanted to know if the subscription does not exist, can we create one in the azure function app itself?我知道我们可以在 ASB 中创建订阅,但我想知道如果订阅不存在,我们可以在 azure function 应用程序本身中创建一个吗? To give more context, if there is a topic trigger in my function app, I want to check if the subscription exists or not.为了提供更多上下文,如果我的 function 应用程序中有主题触发器,我想检查订阅是否存在。 If it does, it uses it, but if not needs to create a new one.如果是,则使用它,但如果不是,则需要创建一个新的。

That'd be a chicken and egg situation.那将是先有鸡还是先有蛋的情况。 The entity has to be there for a function to be triggered by an entity (queue or subscription on a topic).该实体必须存在,才能由实体(主题上的队列或订阅)触发 function。 Otherwise, there's no message to receive that would trigger the function in the first place.否则,没有消息会首先触发 function。

You can work around it by running during Function's initial start-up, but that's not something that is supported by the Functions service natively.您可以通过在 Function 的初始启动期间运行来解决它,但这不是 Functions 服务本身支持的功能。 In my post I show how to achieve that using FunctionsStartup (In-Proc SDK).在我的帖子中,我展示了如何使用FunctionsStartup (In-Proc SDK)实现这一点。 A similar approach could be used with the Isolated Worker SDK.类似的方法可以用于孤立的工作人员 SDK。

You can also express your interest in the feature to be provided by Functions if you'd like by letting the team know .如果您愿意,也可以通过让团队知道来表达您对 Functions 提供的功能的兴趣。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以在 Azure 逻辑应用程序工作流中触发 Azure function 和 Python 运行时? - Is it possible to trigger an Azure function with Python runtime inside a Azure Logic App workflow? 是否可以在一个 Azure function 应用程序中运行两个函数(一个运行 FastAPI - ASGI,一个运行 Flask - WSGI)? - Is it possible to run two functions (one running FastAPI - ASGI, and one running Flask - WSGI), in one Azure function App? 是否可以在 cloudformation 模板中使用多个 email 收件人创建 SNS 主题? - Is to possible to create SNS topic with multiple email Recipients in cloudformation template? BigQuery 表订阅的 Pub/Sub 主题 - Pub/Sub Topic to BigQuery Table Subscription 在 Pubsub 主题订阅中使用 JSON 架构 - Use JSON schema in Pubsub topic subscription Create subscription with Stripe in Lambda function 失败并出现内部服务器错误 - Create subscription with Stripe in Lambda function fails with internal server error 无法在西德地区创建 Azure function 应用程序 - 该地区的配额为 0 个实例 - Unable to create Azure function app in West Germany region - This region has quota of 0 instances 无法在 KAFKA 上创建主题 - Impossible to create a topic on KAFKA 使用 CDK 授予对 SNS 主题订阅上的死信队列的权限 - Using CDK to grant permissions to Dead Letter Queue on SNS Topic Subscription 发送到在创建订阅之前存在的主题的 GCP Pub/Sub 消息 - GCP Pub/Sub Messages sent to topic that existed before the subscription was created
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM