春季云功能GCP不包括春季云流的pubsub
我在同一项目中将GCP的春季云功能和春季云流组合在一起。 我有一个函数,这是我属性中定义的GCP CF的入口点 spring.cloud.function.definition = gcpfunction
i通过StreamBridge桥接弹簧云流绑定功能的结果。
出乎意料的是,春季云流也会自动绑定gcpfunction
函数,并在PubSub中创建一个不必要的主题。我想将功能从春季云流的自动绑定中排除。 我发现唯一的解决方法是将弹簧云功能明确绑定到没有现有函数,例如spring.cloud.stream.function.definition = donotbindfunction
这不是理想的选择而且看起来有些骇人听闻。 还有其他建议的解决方案吗?
我查看了以下主题,但似乎他们并没有真正解决许多问题是否可以禁用Spring-Cloud-stream的功能绑定,以限制特定方法? AS @springbootapplication(dubl = context functionCatalogautoconFiguration.class)disables也为我的gcpfunction
进行配置。
I combine both Spring Cloud Function for GCP and Spring Cloud Stream for PubSub in the same project.
I have one function which is an entrypoint for GCP CF defined in my propertiesspring.cloud.function.definition=gcpFunction
I bridge the result of the function with Spring Cloud Stream binding by StreamBridge.
Unexpectedly Spring Cloud Stream also automatically binds the gcpFunction
function and creates an unwanted topic in PubSub. I would like to exclude the function from the automatic binding for Spring Cloud Stream.
The only workaround I found is to bind Spring Cloud Function explicitly to none existing function e.g. spring.cloud.stream.function.definition=doNotBindFunction
This is not ideal because Spring during startup prints some warnings about a missing function and also looks a bit hacky.
Is there any other recommended solution?
I looked at the following topics but seems like they don't really solve many problem Is it possible to disable spring-cloud-stream's functional binding for a specific method?
as @SpringBootApplication(exclude = ContextFunctionCatalogAutoConfiguration.class) disables also configuration for my gcpFunction
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试设置
spring.cloud.stream.function.autectect = false
。这将关闭功能性豆的自动发现( refdoc )。Try setting
spring.cloud.stream.function.autodetect=false
. This will turn off autodiscovery of functional beans (refdoc).