Sending Commands between Nodes
The CommandBusConnector is in charge of sending commands, based on a given route, from one node to another. This extension to that end provides the SpringHttpCommandBusConnector, which uses plain REST for sending commands.
There are three hard requirements when creating this service and one optional configuration:
-
Local
CommandBus- This "local segment" is the command bus which dispatches commands into the local JVM. It is thus invoked when theSpringHttpCommandBusConnectorreceives a command from the outside, or if it receives a command which is meant for itself. -
RestOperations- The service used to POST a command message to another instance. In most situations theRestTemplateis used for this. -
Serializer- The serializer is used to serialize the command messages before they are sent over and deserialize when they are received. -
Executor(optional) - TheExecutoris used to handle incoming commands and to dispatch commands. Defaults to aDirectExecutorinstance for backwards compatibility.
|
Non-blocking command dispatching
Note that the configurable |