Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Commit

Permalink
[#112]: feat(pre-release): add the NATS plugin
Browse files Browse the repository at this point in the history
[#112]: feat(pre-release): add the NATS plugin
  • Loading branch information
rustatian committed Oct 16, 2021
2 parents 0e62259 + 25e3b16 commit f4c01df
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 88 deletions.
49 changes: 44 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CHANGELOG

## v2.5.0 (-.10.2021)

## 💔 BC:

- 🔨 Some drivers now use a new `config` key to handle local configuration. Involved plugins and drivers:
Expand Down Expand Up @@ -108,11 +110,11 @@ broadcast:
```yaml
# Logs plugin settings
logs:
(....)
# Line ending
#
# Default: "\n".
line_ending: "\n"
(....)
# Line ending
#
# Default: "\n".
line_ending: "\n"
```

- ✏️ [Access log support](https://github.com/spiral/roadrunner-plugins/issues/34) at the `Info` log level.
Expand All @@ -130,6 +132,7 @@ http:
destroy_timeout: 60s
```
- ✏️ HTTP middleware to handle `X-Sendfile` [header](https://github.com/spiral/roadrunner-plugins/issues/9).
Middleware reads the file in 10mb chunks. If the file size is smaller than 10mb, the middleware fits the buffer to the file size.
```yaml
http:
address: 127.0.0.1:44444
Expand Down Expand Up @@ -165,6 +168,41 @@ server:
```
The script should start a worker as the last command. For the `pipes`, scripts should not contain programs, which can close `stdin`, `stdout` or `stderr`.

- ✏️ Nats jobs driver support - [PR](https://github.com/spiral/roadrunner-plugins/pull/68).
```yaml
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" ]
```
- Driver uses NATS JetStream API and not compatible with non-js API.


- ✏️ Response API for the NATS, RabbitMQ, SQS and Beanstalk drivers. This means, that you'll be able to respond to a specified in the response queue.
Limitations:
- To send a response to the queue maintained by the RR, you should send it as a `Job` type. There is no limitation for the other queues (tubes, subjects) responses.
- Driver uses the same endpoint (address) to send the response as specified in the configuration.

## 🩹 Fixes:

Expand All @@ -178,6 +216,7 @@ The script should start a worker as the last command. For the `pipes`, scripts s
- 📦 roadrunner `v2.5.0`
- 📦 roadrunner-plugins `v2.5.0`
- 📦 roadrunner-temporal `v1.0.10`
- 📦 endure `v1.0.5`
- 📦 goridge `v3.2.2`

## v2.4.1 (13.09.2021)
Expand Down
41 changes: 23 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ require (
github.com/spiral/endure v1.0.6
github.com/spiral/errors v1.0.12
github.com/spiral/goridge/v3 v3.2.2
github.com/spiral/roadrunner-plugins/v2 v2.5.0-beta.3
github.com/spiral/roadrunner/v2 v2.5.0-beta.3
github.com/spiral/roadrunner-plugins/v2 v2.5.0-rc.1
github.com/spiral/roadrunner/v2 v2.5.0-rc.1
// ---------------------
github.com/stretchr/testify v1.7.0
// SPIRAL --------------
github.com/temporalio/roadrunner-temporal v1.0.10-beta.1
github.com/temporalio/roadrunner-temporal v1.0.10-rc.1
// ---------------------
github.com/vbauerster/mpb/v5 v5.4.0
)
Expand All @@ -30,33 +30,33 @@ require (
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/andybalholm/brotli v1.0.3 // indirect
github.com/aws/aws-sdk-go-v2 v1.9.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.4.2 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.1 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.9.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2 v1.9.2 // indirect
github.com/aws/aws-sdk-go-v2/config v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.9.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.4.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.7.2 // indirect
github.com/aws/smithy-go v1.8.0 // indirect
github.com/beanstalkd/go-beanstalk v0.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
github.com/caddyserver/certmagic v0.15.0 // indirect
github.com/caddyserver/certmagic v0.15.1 // indirect
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/emicklei/proto v1.9.1 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-redis/redis/v8 v8.11.4 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.1.0 // indirect
github.com/gofiber/fiber/v2 v2.20.1 // indirect
github.com/gofiber/fiber/v2 v2.20.2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/gogo/status v1.1.0 // indirect
Expand All @@ -80,9 +80,14 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mholt/acmez v1.0.0 // indirect
github.com/miekg/dns v1.1.43 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.1.0 // indirect
github.com/nats-io/nats.go v1.13.0 // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
Expand Down Expand Up @@ -119,12 +124,12 @@ require (
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/net v0.0.0-20211008194852-3b03d305991f // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect
golang.org/x/sys v0.0.0-20211015200801-69063c4bb744 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
google.golang.org/genproto v0.0.0-20211008145708-270636b82663 // indirect
google.golang.org/genproto v0.0.0-20211016002631-37fc39342514 // indirect
google.golang.org/grpc v1.41.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
Expand Down
Loading

0 comments on commit f4c01df

Please sign in to comment.