简体   繁体   English

骆驼动态模拟端点

[英]Camel Dynamic Mock Endpoint

I have a particular route that is denoted as http://dummy in my route builder. 我在我的路线构建器中有一条称为http:// dummy的特定路线。

The reason being that at run time I dynamically generate what the actual route should be and send it as part of the header that Camel then picks up and uses instead. 原因是在运行时我动态生成了实际的路由,并将其作为头文件的一部分发送,然后由Camel提取并改为使用。

This works in practice however it is problematic when using Mocks. 这在实践中可行,但是在使用Mocks时会出现问题。

I am wondering - in Camel is it possible to Mock an endpoint that does not exist (at compile time) in your route builder? 我想知道-在骆驼中,可以模拟您的路径构建器中不存在的端点(在编译时)吗?

只需使用Camel的AdviceWith API用模拟端点替换您的虚拟端点即可进行测试

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM