Commit Graph

236 Commits

Author SHA1 Message Date
Piotr Piotrowski
334dddcbee Add tests for parse.go 2023-04-25 12:11:20 +02:00
Piotr Piotrowski
261cfc5129 Revert Fetch() behavior to not verify request ID (#1238) 2023-03-24 16:43:07 +01:00
Piotr Piotrowski
f3d29054e3 [CHANGED] Use different subjects per PR when using Fetch and FetchBatch (#1237) 2023-03-24 09:53:57 +01:00
Justin Vallelonga
aaa352ceaf Update js.go
typo
2023-03-08 20:04:12 -07:00
Piotr Piotrowski
e059b4d17c [FIXED] Retry recreating ordered consumer on insufficient resources error (#1217) 2023-02-23 15:25:42 +01:00
Piotr Piotrowski
edb105cbe9 [ADDED] FetchBatch method to utilize non-blocking pull subscription requests (#1211)
Co-authored-by: Waldemar Quevedo <wally@nats.io>
2023-02-15 15:18:50 +01:00
Guillaume Delbergue
5677b935a7 js: use custom inbox prefix in async reply (#1190)
* js: use custom inbox prefix in async reply

Signed-off-by: Guillaume Delbergue <guillaume.delbergue@hiventive.com>
Co-authored-by: Waldemar Quevedo <wally@nats.io>
2023-01-17 08:03:40 -08:00
Piotr Piotrowski
32b9daa3d2 [ADDED] Service api improvements (#1160)
Co-authored-by: Tomasz Pietrek <melgaer@gmail.com>
2022-12-20 12:52:16 +01:00
Sam Tavakoli
a52a9ec753 Provide a way to handle 409 Leadership Changed errors in client
Without this change, it makes it hard for clients to handle consumer
errors relating to leadership changes differently from any other
error.

Follows same approach as ErrConsumerDeleted.
2022-12-02 13:15:52 +00:00
Piotr Piotrowski
4d7d95166a [ADDED] Extract ErrConsumerDeleted in Fetch() (#1125)
* Extract ErrConsumerDeleted in Fetch()

* Update test/js_test.go

Co-authored-by: Waldemar Quevedo <wally@synadia.com>

Co-authored-by: Waldemar Quevedo <wally@synadia.com>
2022-11-08 16:21:36 +01:00
Tomasz Pietrek
7ac1087d8c [CHANGED] Make lookupStreamBySubject public (#1114) 2022-10-31 16:30:55 +01:00
Derek Collison
1d9796fd33 Added support for KV mirrors and sources and updated state for proper Put() and Get() with mirrors and across domains, e.g. leafnodes.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-19 16:01:39 -07:00
Neil Alexander
0689e7a34c Review comments 2022-10-15 12:05:25 +01:00
Neil Alexander
d5eb48b4e6 Update InactiveThreshold comments
These hadn't been updated after nats-io/nats-server#3190 seemingly.
2022-10-14 10:00:06 +01:00
Sylvain Rabot
2b03e25fca Improve durable consumer unsubscribe comment (#1100)
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2022-10-06 17:54:23 +02:00
Piotr Piotrowski
1ee76eacf9 [CHANGED] Ordered consumer recreate on missing heartbeat (#1097) 2022-10-04 11:15:19 +02:00
Piotr Piotrowski
991297b6ad Merge pull request #1085 from nats-io/update-chan-subscribe-doc
js: update Chan Subscribe with note about capacity
2022-09-22 12:57:44 +02:00
Piotr Piotrowski
4832b65427 [CHANGED] Remove restriction on AckNone policy for pull consumers (#1090) 2022-09-21 11:12:10 +02:00
Piotr Piotrowski
3c209f575f [UPDATED] Adjust consumer creation to nats-server v2.9.0 (#1080) 2022-09-16 17:46:40 +02:00
Waldemar Quevedo
22afdbddfb js: update Chan Subscribe with note about capacity 2022-09-16 07:42:48 -07:00
Deepak Sah
866ce0858b [ADDED] Option to set memory storage to true for a consumer (#1078) 2022-09-15 21:12:45 +02:00
Derek Collison
11b678285e Make prefix aware creation of inbox public.
This would have been useful for example I worked on that needed multiple replies.

Signed-off-by: Derek Collison <derek@nats.io>
2022-09-10 09:57:46 -07:00
Neil Alexander
bb31b65499 Allow AckAll for pull-based consumers
If you are the only client pulling on a given consumer, the
efficiency gains of fetching batches is largely lost if you
have to acknowledge every message you received individually.
It would seem intuitive to be able to acknowledge only the
most recent message in the batch instead.
2022-08-31 14:20:52 +01:00
Piotr Piotrowski
c3a557a44c Add subject filtering when listing streams (#1062) 2022-08-31 14:30:53 +02:00
Waldemar Quevedo
164805ca9c js: Add JetStreamError with API response details (#1047)
* js: Add JetStreamError with more API response details
* js: Convert errors to JetStreamError and move to separate file

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Co-authored-by: Piotr Piotrowski <piotr@synadia.com>
2022-08-23 10:16:28 -07:00
Ivan Kozlovic
b81c9e71b4 Merge pull request #1044 from nats-io/js-error-codes
[IMPROVED] Add JetStream error codes, extract ErrConsumerNameAlreadyInUse
2022-08-16 11:08:48 -06:00
Piotr Piotrowski
82272a03d9 Address review comments 2022-08-16 09:54:34 +02:00
Byron Ruth
2de06e01e7 Add PullMaxBytes fetch option
Signed-off-by: Byron Ruth <b@devel.io>
2022-08-15 08:53:04 -04:00
Byron Ruth
6904b154ff Add MaxRequestMaxBytes consumer option
Signed-off-by: Byron Ruth <b@devel.io>
2022-08-15 08:18:56 -04:00
Piotr Piotrowski
4d7a668a95 Use JetStream error codes, extract ErrConsumerNameAlredyInUse 2022-08-11 17:58:52 +02:00
Ivan Kozlovic
c040b4fa50 [FIXED] JetStream: Fail Ack() (and the likes) for AckNone consumer
Resolves #1027

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-08-03 18:48:20 -06:00
Jeremy Saenz
1eb8a22c21 Started implementation of direct gets by subject 2022-08-03 09:50:45 -07:00
Belyakov Sergey
add6c3994b Update js.go
fix nil pointer dereference when jsi is not inited
2022-08-01 12:02:03 +07:00
Deepak Sah
fcc7c44324 Allow setting consumer replicas though options (#1019)
[ADDED] Allow setting consumer replicas though options
2022-07-29 12:07:11 -06:00
Ivan Kozlovic
8b04057ca6 Merge pull request #1023 from nats-io/update_certs
Updated TLS certs, move to Go 1.18, fix code due staticcheck report
2022-07-29 12:03:26 -06:00
Ivan Kozlovic
787e58b7c5 Updated TLS certs, move to Go 1.18, fix code due staticcheck report
Fixed a TLS test that fails on macOS but passes on Linux.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-07-29 11:35:42 -06:00
Ivan Kozlovic
dcf9b938d5 Merge pull request #1022 from bruth/patch-1
[FIXED] Ephemeral PullConsumer's Fetch() would fail with "no responders"
2022-07-29 11:19:18 -06:00
Byron Ruth
726f0d8fb1 Add guard for pull mode
Signed-off-by: Byron Ruth <b@devel.io>
2022-07-29 13:13:45 -04:00
Byron Ruth
fed719aed1 Use consumer name in subject for ephemeral 2022-07-29 08:46:12 -04:00
Ivan Kozlovic
b22f6cbc82 Add options instead of introducing new DirectGetMsg API.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-07-28 19:26:56 -06:00
Ivan Kozlovic
6528169f0d [ADDED] JetStream: DirectGetMsg API
The AllowDirect boolean must be set in the stream configuration.
When that is the case, then all servers (leader and replicas) are
part of a DQ group and can respond to a "DIRECT.GET" request.

The KeyValue store makes use of the direct get when connecting
to a stream with the AllowDirect option.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-07-25 16:45:30 -06:00
Weida Hong
8a4b9f4d11 Consistent error value of context timeout on subscription Fetch() interface. (#1011)
* Add test case about subscription timeout behavior

* Makes context timeout error behavior consistent.

If user provides context object and context timeout,
always return the timeout error from context.
2022-07-04 04:26:08 -07:00
Byron Ruth
d069d15245 Add additional note to JetStream.PullSubscribe on durable semantics 2022-06-07 13:32:37 -04:00
Byron Ruth
5a648026ad Use native time.Time.Equal method for equality check
Fixes #992
2022-06-07 10:03:14 -04:00
Piotr Piotrowski
fe748b369b Merge pull request #990 from nats-io/stream-info-deleted-details
ADDED: option to fetch deleted details in stream info
2022-06-07 15:33:24 +02:00
Piotr Piotrowski
4a1666cd47 Add option to fetch deleted details in stream info 2022-06-07 11:03:30 +02:00
Derek Collison
5a292d0c21 Merge pull request #989 from nats-io/ordered_mem_r1
Ordered will force R1 and memory storage
2022-06-06 17:02:37 -07:00
Derek Collison
5aa2500353 Ordered will force R1 and memory storage
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-06 08:56:04 -07:00
Piotr Piotrowski
39c636d32f Add support for enhanced stream purge in JetStream 2022-06-06 13:53:25 +02:00
Piotr Piotrowski
ffc3c71d21 Fix sending ack when AckNonePolicy is set 2022-06-02 15:30:49 +02:00