You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

DataSet Component

Testing of distributed and asynchronous processing is notoriously difficult. The Mock, Test and DataSet endpoints work great with the Camel Testing Framework to simplify your unit and integration testing using Enterprise Integration Patterns and Camel's large range of Components together with the powerful Bean Integration.

The DataSet component provides a mechanism to easily perform load & soak testing of your system. It works by allowing you to create DataSet instances both as a source of messages and as a way to assert that the data set is received.

URI format

dataset:name

Where name is used to find the DataSet instance in the Registry

Example

For example to test that 10 million messages are sent to a queue then consumed from a queue without loosing any messages.

// 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");

The above would look in the Registry to find the foo DataSet instance which is used to create the messages.

  • No labels