Class: Euston::Daemons::Pipeline::EventStoreDispatcher::Component
- Inherits:
-
Euston::DaemonComponent
- Object
- Euston::DaemonComponent
- Euston::Daemons::Pipeline::EventStoreDispatcher::Component
- Extended by:
- RabbitMq::Exchanges
- Defined in:
- lib/euston-daemons/pipeline/lib/event_store_dispatcher/component.rb
Instance Method Summary collapse
-
#initialize(channel, id = 1, log = Euston::NullLogger.instance) ⇒ Component
constructor
A new instance of Component.
Methods inherited from Euston::DaemonComponent
Methods included from Exceptions
Constructor Details
#initialize(channel, id = 1, log = Euston::NullLogger.instance) ⇒ Component
Returns a new instance of Component.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/euston-daemons/pipeline/lib/event_store_dispatcher/component.rb', line 8 def initialize channel, id = 1, log = Euston::NullLogger.instance @channel = channel @channel.prefetch = 1 @channel.tx_select @id = id @log = log @event_store = DaemonEnvironment.event_store @stopwatch = Stopwatch.new.when(:finished => method(:log_elapsed_time)) @commands_exchange = self.class.get_exchange channel, :commands @events_exchange = self.class.get_exchange channel, :events @buffer = MessageBuffer::Buffer.new DaemonEnvironment.event_store_mongodb end |