80.4. Example
例如,要测试一组消息是否已发送到队列,然后从队列使用,而不会丢失任何信息:
// send the dataset to a queue from("dataset:foo").to("activemq:SomeQueue"); // now lets test that the messages are consumed correctly from("activemq:SomeQueue").to("dataset:foo");
以上将查看,以查找用于创建消息的 foo DataSet 实例。
然后,您可以创建一个 DataSet 实现,比如在以下使用 SimpleDataSet
,配置数据集如何以及消息等类似的内容。