Module: Consumer::Postgres

Included in:
Controls::Consumer::Example, Controls::Consumer::Incrementing
Defined in:
lib/consumer/postgres/postgres.rb,
lib/consumer/postgres/controls/id.rb,
lib/consumer/postgres/position_store.rb,
lib/consumer/postgres/controls/category.rb,
lib/consumer/postgres/controls/consumer.rb,
lib/consumer/postgres/controls/position.rb,
lib/consumer/postgres/controls/event_data.rb,
lib/consumer/postgres/controls/stream_name.rb,
lib/consumer/postgres/position_store/messages.rb,
lib/consumer/postgres/position_store/stream_name.rb,
lib/consumer/postgres/controls/position/stream/write.rb,
lib/consumer/postgres/controls/position/store/message.rb

Defined Under Namespace

Modules: Controls Classes: PositionStore

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(cls) ⇒ Object



3
4
5
6
7
# File 'lib/consumer/postgres/postgres.rb', line 3

def self.included(cls)
  cls.class_exec do
    include ::Consumer
  end
end

Instance Method Details

#configure(session: nil, batch_size: nil, position_store: nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/consumer/postgres/postgres.rb', line 9

def configure(session: nil, batch_size: nil, position_store: nil)
  EventSource::Postgres::Get.configure(
    self,
    session: session,
    batch_size: batch_size
  )

  PositionStore.configure(
    self,
    stream_name,
    position_store: position_store,
    session: session
  )
end