Module: Consumer::Postgres::Controls::Position::Stream::Write

Defined in:
lib/consumer/postgres/controls/position/stream/write.rb

Class Method Summary collapse

Class Method Details

.call(stream_name = nil, position: nil) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/consumer/postgres/controls/position/stream/write.rb', line 7

def self.call(stream_name=nil, position: nil)
  stream_name ||= StreamName::Position.example

  message = Store::Recorded.example position: position

  Messaging::Postgres::Write.(message, stream_name)

  stream_name
end