roadrunner-server / roadrunner-plugins

📦 Home for the roadrunner plugins
MIT License
25 stars 9 forks source link

feat(jobs): nats driver #68

Closed rustatian closed 2 years ago

rustatian commented 2 years ago

Reason for This PR

closes: #24

Description of Changes

Nats config:


nats:
  addr: "demo.nats.io"

jobs:
  num_pollers: 10
  pipeline_size: 100000
  pool:
    num_workers: 10
    max_jobs: 0
    allocate_timeout: 60s
    destroy_timeout: 60s

  pipelines:
    test-1:
      driver: nats
      prefetch: 100
      subject: "default"
      stream: "foo"
      deliver_new: "true"
      rate_limit: 100
      delete_stream_on_stop: false
      delete_after_ack: false
      priority: 2

  consume: [ "test-1" ]

Where:

Pipeline configuration:

Build-in options:

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

PR Checklist

[Author TODO: Meet these criteria.] [Reviewer TODO: Verify that these criteria are met. Request changes if not]

codecov[bot] commented 2 years ago

Codecov Report

Merging #68 (6334a1d) into master (9138560) will increase coverage by 0.35%. The diff coverage is 68.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   68.62%   68.98%   +0.35%     
==========================================
  Files         112      118       +6     
  Lines        9327     9920     +593     
==========================================
+ Hits         6401     6843     +442     
- Misses       2293     2403     +110     
- Partials      633      674      +41     
Impacted Files Coverage Δ
amqp/plugin.go 90.90% <ø> (ø)
boltdb/boltjobs/item.go 46.66% <0.00%> (-0.71%) :arrow_down:
memory/memoryjobs/item.go 78.68% <0.00%> (-2.67%) :arrow_down:
websockets/executor/executor.go 68.18% <0.00%> (ø)
jobs/plugin.go 61.83% <14.28%> (-1.94%) :arrow_down:
jobs/listener.go 47.65% <23.80%> (-4.98%) :arrow_down:
amqp/amqpjobs/listener.go 83.33% <25.00%> (+4.76%) :arrow_up:
nats/natsjobs/item.go 46.55% <46.55%> (ø)
jobs/protocol/error.go 47.82% <47.82%> (ø)
jobs/pipeline/pipeline.go 72.91% <50.00%> (+0.82%) :arrow_up:
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9138560...6334a1d. Read the comment docs.