Class: Synapse::Configuration::AsynchronousCommandBusDefinitionBuilder

Inherits:
SimpleCommandBusDefinitionBuilder show all
Defined in:
lib/synapse/configuration/component/command_bus/async_command_bus.rb

Overview

Definition builder used to build an asynchronous command bus

Examples:

The minimum possible effort to build an asynchronous command bus

async_command_bus

Create an asynchronous command bus with a custom thread count

async_command_bus do
  use_threads 8, 12
end

See Also:

Instance Attribute Summary

Attributes inherited from DefinitionBuilder

#id

Instance Method Summary collapse

Methods inherited from SimpleCommandBusDefinitionBuilder

#use_handler_tag, #use_rollback_policy, #use_unit_factory

Methods inherited from DefinitionBuilder

#anonymous, #as_prototype, #as_singleton, build, #build_composite, #build_definition, #identified_by, #initialize, #register_definition, #resolve, #resolve_tagged, #tag, #use_factory, #use_instance

Constructor Details

This class inherits a constructor from Synapse::Configuration::DefinitionBuilder

Instance Method Details

#use_threads(min_threads, max_threads = nil) ⇒ undefined

Parameters:

  • min_threads (Integer)
  • max_threads (Integer) (defaults to: nil)

Returns:

  • (undefined)


18
19
20
21
# File 'lib/synapse/configuration/component/command_bus/async_command_bus.rb', line 18

def use_threads(min_threads, max_threads = nil)
  @min_threads = min_threads
  @max_threads = max_threads
end