- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
第一个问题:
我无法真正理解enrich()
和pollEnrich()
之间的区别。也许 Camel 使用的术语不是很好。
我在这里阅读:http://camel.apache.org/content-enricher.html
Content enrichment using the enrich DSL element
Camel comes with two flavors of content enricher in the DSL
- enrich
- pollEnrich
enrich uses a Producer to obtain the additional data. It is usually used for Request Reply messaging, for instance to invoke an external web service. pollEnrich on the other hand uses a Polling Consumer to obtain the additional data. It is usually used for Event Message messaging, for instance to read a file or download a FTP file.
Enrich and pollEnrich can’t access information in the current exchange
Neither enrich nor pollEnrich can leverage any information from the current exchange. This means, for example, that you can’t store a filename header on the exchange for pollEnrich to use to select a particular file. This may change in the future if the Camel team can find a solution.
public class ExampleAggregationStrategy implements AggregationStrategy {
public Exchange aggregate(Exchange original, Exchange resource) {
Object originalBody = original.getIn().getBody();
Object resourceResponse = resource.getIn().getBody();
Object mergeResult = ... // combine original body and resource response
if (original.getPattern().isOutCapable()) {
original.getOut().setBody(mergeResult);
} else {
original.getIn().setBody(mergeResult);
}
return original;
}
}
Exchange original
,这不是“当前交换”吗?如果不是,那么“原始交换”代表什么交换?
最佳答案
区别在于:
enrich
假定您要使用传入的Exchange作为另一个服务请求的参数。例如,传入的Exchange可以是一个userID,但是您确实需要整个User对象,因此您可以通过将userID传递到返回返回成为Exchange的User对象的REST服务的enrich
,以此类推。pollEnrich
假定传入的Exchange是一个简单的触发器,它告诉PollingConsumer查找数据并创建一个Exchange(忽略传入的Exchange的内容)。例如,您可能有一个计时器或其他业务流程事件,需要拾取一个文件进行处理,等等。也就是说,传入的Exchange数据不用于动态配置PollingConsumer ...仅URI用于此目的。 enrich
和
pollEnrich
的传入/返回交换
关于activemq - Camel -内容丰富器: enrich() vs pollEnrich(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19098466/
场景: private readonly IConnection connection; this.connection = connectionFactory.CreateConnection();
想知道是否可以在 activeMQ 服务器中完成任何配置,将消息从 DLQ 重定向到同一服务器上的另一个队列。 例如。 我有一个队列“MAINQUEUE”,其中有很多消息已激活客户端确认,在处理时如果
我正在 ActiveMQ 中的一个系统上工作,我真的不想丢失消息。我的问题是重试消息导致我的消费者阻塞(而不是处理他们可以处理的消息)。我想给失败的消息几天重试(例如,我的潜在目的地之一是我将通过 S
我们对 AMQ 使用以下配置 定期我有奇怪的问题 - 松散的消息。实际上AMQ说一切正常并且消
我已按照教程安装 ActiveMQ http://servicebus.blogspot.com/2011/02/installing-apache-active-mq-on-ubuntu.html
当我们使用 ActiveMQ 时,我们可以信任 ActiveMQ 服务器的可靠性。例如在开发非实时软件时(不需要立即发送数据。但应该发送)。我们能否信任 activeMQ 作为确认消息传递的可靠来源。
我遇到了 issue使用 ActiveMQ 并希望跟踪/查看所有 ActiveMQ 事件。我能找到的唯一日志文件是与持久数据相关联的(如果打开的话)。我是否查看或生成了任何其他日志文件来告诉我 Act
我们正面临 ActiveMQ 及其使用者的随机问题。我们观察到,即使连接到 ActiveMQ 队列,也很少有消费者没有收到消息。但是在消费者重启后它工作正常。 我们在 ActiveMQ 端有一个名为
有什么方法可以跟踪 ActiveMQ 中的延迟(计划)消息? 我在 AMQ 网络控制台中没有看到任何东西,它们似乎只有在延迟到期时才进入队列……而且我在 JMX 控制台中也找不到它,也许我搜索得不够好
我对Apache ActiveMQ的功能感到困惑。 我从this link下载了ActiveMQ 。所以我这样使用它(环境:Windows 7):我启动 bin/activemq.bat,然后它就可以
我们有一个 ActiveMQ 代理,它使用 JMS、AMQP 和 MQTT 连接到不同的客户端。由于某种原因,我们还没有弄清楚一组特定的 MQTT 客户端经常(并非总是)持久订阅。这是一个测试环境,其
在activemq中有什么方法可以获取消息的数量代理端每秒/每分钟消耗/产生的数量? 我已经尝试使用http://activemq.apache.org/jmeter-performance-test
如何在队列上的 ActiveMQ 中设置 redeliveryPolicy? 1) 在文档中,请参阅:activeMQ Redelivery ,说明您应该在 ConnectionFactory 或 C
我查了一下,它用于在两个系统之间发送消息。 但为什么?为什么不直接使用数据库? 一定有一些 ActiveMQ 具有 数据库 没有的功能吗? 最佳答案 它用于在两个分布式进程之间进行可靠的通信。 是的,
我在生产系统中运行 ActiveMQ。我们的一些队列的流量非常大,而有些队列的流量非常低。我对镜像其中一个低容量队列感兴趣,这样我就可以围绕接收到的消息构建非正式的监控服务。 不幸的是,the onl
我们已经使用此配置为 ActiveMQ Broker 配置了 Broker redelivery 插件。
有什么方法可以检查特定队列是否已存在于 ActiveMQ 中? 最佳答案 http://activemq.apache.org/how-can-i-get-a-list-of-the-topics-a
有人知道如何将 activemq-core.xsd url 与 jar 文件 (activemq-core-5.2.0.jar) 中的 activemq.xsd 关联起来? 我在互联网上找到了一些解决
我是 activemq 的新手。我试图使用 activemq 代理来订阅/发布消息。但至于缺乏经验,我不知道该怎么做,也不知道是否真的可以做到。我在谷歌上搜索了很多,但不幸的是,没有适合此类功能的示例
我一直在努力配置 ActiveMQ 代理,让我感到困惑的一件事是,我读过的所有内容都将 NIO 描述为“如果您需要扩展的不错选择”或“如果您需要更快的速度” ,所以我的问题是他们为什么不说“总是使用
我是一名优秀的程序员,十分优秀!