I had worked with both SEDA and direct, and I\'ve also read the documentation.
But I still cannot visualize the usage of SEDA and direct. Vm is new to me.
Pleas
The difference between direct:
and seda:
components is that the first is synchronous and the second is asynchronous, with a queue.
The practical difference is that for sending synchronous messages, you must wait for the route to complete, whereas with asynchronous messages, its "fire and forget" - you put them onto a queue and presume a consumer will process them. You can also have multiple consumers (parallelisation).
The last example, vm:
is also asynchronous, but it can also call routes in different camel contexts within the same JVM. Imagine application 1 has a camel context, and application 2 has a camel context, in this way they can communicate with each other.
edit:
In relation to "what to use when" :
direct:
for calling normally between endpoints in a camel contextseda:
when you need parallelisation or queues, but dont want to use jms:
vm:
when calling between applications.There are of course many other use cases but those are the common ones (subjective to my own experience)