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



24
25
26
27
# File 'lib/waterdrop/contracts/message.rb', line 24

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.



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

def max_payload_size
  @max_payload_size
end