18.6. 例
たとえば、メッセージのセットがキューに送信され、メッセージを失うことなくキューから消費されることをテストするには、以下を実行します。
// 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");
// 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 インスタンスを見つけます。
次に、以下に示すように SimpleDataSet を使用するなど、DataSet 実装を作成し、データセットのサイズやメッセージがどのように見えるかなどを設定します。