Class: Eventboss::Sender

Inherits:
Object
  • Object
show all
Defined in:
lib/eventboss/sender.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, queue:) ⇒ Sender

Returns a new instance of Sender.



3
4
5
6
# File 'lib/eventboss/sender.rb', line 3

def initialize(client:, queue:)
  @client = client
  @queue = queue
end

Instance Method Details

#send_batch(payload) ⇒ Object



8
9
10
11
12
13
# File 'lib/eventboss/sender.rb', line 8

def send_batch(payload)
  client.send_message_batch(
    queue_url: queue.url,
    entries: Array(build_entries(payload))
  )
end