class Synapse::Configuration::AsynchronousCommandBusDefinitionBuilder
Definition
builder used to build an asynchronous command bus
@see SimpleCommandBusDefinitionBuilder
For additional options @see Contender::Pool::ThreadPoolExecutor For pool options
@example The minimum possible effort to build an asynchronous command bus
async_command_bus
@example Create an asynchronous command bus with a custom thread count
async_command_bus do use_pool_options size: 2 end
Protected Instance Methods
create_command_bus(unit_factory)
click to toggle source
@param [UnitOfWorkFactory] unit_factory @return [AsynchronousCommandBus]
# File lib/synapse/configuration/component/command_bus/async_command_bus.rb, line 28 def create_command_bus(unit_factory) command_bus = Command::AsynchronousCommandBus.new unit_factory command_bus.thread_pool = create_thread_pool command_bus end
populate_defaults()
click to toggle source
@return [undefined]
Calls superclass method
# File lib/synapse/configuration/component/command_bus/async_command_bus.rb, line 21 def populate_defaults super use_pool_options size: 4 end