Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bull
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 175
    • Issues 175
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OptimalBits
  • bull
  • Issues
  • #1357
Closed
Open
Issue created Jun 20, 2019 by Administrator@rootContributor

Ability to limit size of job data

Created by: gabegorelick

Feature request

Many queues have upper limits for the size of messages that you can send through them. For example, SQS limits messages to 256 KB.

Such limits are really important for a queue backed by Redis, since memory may be limited: you don't want someone enqueuing 1GB jobs!

Bull should check the size of jobData and return an error if it's larger than a configurable limit: https://github.com/OptimalBits/bull/blob/c0ee6be03c6d47d60465d2bae0d2566d5bf0d661/lib/job.js#L61-L64

Since it has to serialize job data to a string anyway, Bull should be able to approximate the size a job would occupy in Redis by checking the length of the serialized string: https://github.com/OptimalBits/bull/blob/c0ee6be03c6d47d60465d2bae0d2566d5bf0d661/lib/job.js#L132-L135

Assignee
Assign to
Time tracking