Exception: ActiveJob::QueueAdapters::ActiveElasticJobAdapter::SerializedJobTooBig

Inherits:
Error
  • Object
show all
Defined in:
lib/active_job/queue_adapters/active_elastic_job_adapter.rb

Overview

Raised when job exceeds 256 KB in its serialized form. The limit is imposed by Amazon SQS.

Instance Method Summary collapse

Constructor Details

#initialize(serialized_job) ⇒ SerializedJobTooBig

Returns a new instance of SerializedJobTooBig.



35
36
37
38
39
40
41
# File 'lib/active_job/queue_adapters/active_elastic_job_adapter.rb', line 35

def initialize(serialized_job)
  msg = "  super(<<-MSG)\n    The job contains \#{serialized_job.bytesize} bytes in its serialzed form,\n    which exceeds the allowed maximum of \#{MAX_MESSAGE_SIZE} bytes imposed by Amazon SQS.\n  MSG\nend\n"