Class: WaterDrop::Contracts::Message

Inherits:
Karafka::Core::Contractable::Contract
  • Object
show all
Defined in:
lib/waterdrop/contracts/message.rb

Overview

Contract with validation rules for validating that all the message options that we provide to producer are valid and usable

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_payload_size:) ⇒ Message

Returns a new instance of Message.

Parameters:

  • max_payload_size (Integer)

    max payload size



22
23
24
25
# File 'lib/waterdrop/contracts/message.rb', line 22

def initialize(max_payload_size:)
  super()
  @max_payload_size = max_payload_size
end

Instance Attribute Details

#max_payload_sizeObject (readonly)

Returns the value of attribute max_payload_size.



19
20
21
# File 'lib/waterdrop/contracts/message.rb', line 19

def max_payload_size
  @max_payload_size
end