问题描述
这是当响应来自使用 Spring Integration DSL 的 rabbitMQ 回复队列时,如何实现 HTTP 请求/回复?.
我们能够在本地成功构建 Spring Integration 应用程序和 SCDF 流.我们可以向绑定到 SCDF 流兔源的 rabbitMQ 请求队列发送一个 http 请求.我们还可以从绑定到 SCDF 流兔接收器的 rabbitMQ 响应队列接收响应.
We were able to build the Spring Integration application and the SCDF stream successfully locally. We could send a http request to the rabbitMQ request queue which was bound to the SCDF stream rabbit source. We could also receive the response back from the rabbitMQ response queue which was bound to the SCDF stream rabbit sink.
我们已将 SCDF 流部署到 PCF 环境中,该环境绑定了内部 rabbitMQ 代理.现在我们需要在 Spring Integration 应用程序属性中指定 spring rabbitMQ 连接信息 - 目前它使用默认的 localhost@5762,这不再有效.有谁知道如何获得这个rabbitMQ 配置属性?我们已经检查了 SCDF 流兔子源/接收器日志文件,但找不到信息.我知道我们可能需要内部检查在 PCF 环境中设置 SCDF/rabbitMQ 的人,但到目前为止我们还没有听到他们的答案.
We have deployed the SCDF stream into PCF environment which had a binding of an internal rabbitMQ broker. Now we need to specify the spring rabbitMQ connection information in the Spring Integration application properties - currently it's using the default localhost@5762, which is no longer valid. Does anyone know how to get this rabbitMQ configuration properties? We already checked the SCDF stream rabbit source/sink log files but couldn't find the information. I know we probably need to check internally whoever set up the SCDF/rabbitMQ in PCF environment, but so far we haven't heard the answers from them.
此外,我们似乎可以采用不同的方法将 SCDF 流和集成应用程序绑定到单独的 rabbitMQ 实例(而不是使用与 SCDF 配置捆绑在一起的现有实例).这是推荐的解决方案吗?
Also, it appears we can have a different approach that binds both the SCDF stream and the integration application to a separate rabbitMQ instance (instead of using the existing one bundled with the SCDF configuration). Is it a recommended solution?
谢谢,
推荐答案
目前尚不清楚您是在 PCF 上使用 SCDF 磁贴还是 SCDF OSS(通过 manfest.yml
).
It is unclear whether you're using the SCDF tile or the SCDF OSS (via manfest.yml
) on PCF.
假设您使用的是 OSS、AFA.在这种情况下,您在 manifest.yml
中提供了正确的 RMQ 服务实例配置(您预先创建的),然后 SCDF 将自动传播该 RMQ 服务实例并将其绑定到它的应用程序正在部署到您的 ORG/空间.您无需手动处理连接凭据.
Suppose you're using the OSS, AFA. In that case, you are providing the right RMQ service-instance configuration (that you pre-created) in the manifest.yml
, then SCDF would automatically propagate that RMQ service instance and bind it to the apps it is deploying to your ORG/Space. You don't need to muck around with connection credentials manually.
另一方面,如果您使用 SCDF Tile,SCDF 服务代理将自动创建 RMQ SI 并自动将其绑定到它部署的应用程序.
On the other hand, if you are using the SCDF Tile, the SCDF service broker will auto-create the RMQ SI and automatically bind it to the apps it deploys.
总而言之,没有理由手动传递连接凭据或将它们打包为应用程序内的应用程序属性.只要您正确配置了所有这些,您就可以自动执行所有这些操作.
In summary, there's no reason to manually pass the connection credentials or pack them as application properties inside your apps. You can automate all this provided you're configuring all this correctly.
这篇关于如何查找绑定到部署在 Tanzu (Pivotal/PCF) 环境上的 SCDF 流的 RabbitMQ 服务器的连接信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!