Commit Graph

202 Commits

Author SHA1 Message Date
Ante Gulin
f95d02a8a0 [IMPROVED] Fix typo in doc comment for SkipConsumerLookup (#1355) 2023-07-31 12:04:59 +02:00
Piotr Piotrowski
3818089dbb [FIXED] PublishAsyncMaxPending not reset after server disconnect (#1346)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-07-19 11:51:42 +02:00
Byron Ruth
fd05bbb000 [FIXED] Unset start time for ordered consumer on retry (#1341)
If an ordered consumer was configured with a start time, on
retry, the copied consumer config would start with sequence
but the existing start time opt would conflict causing
a config error.

Fix #1281

Signed-off-by: Byron Ruth <byron@nats.io>
2023-07-07 13:46:08 +02:00
Piotr Piotrowski
76b92fb24f [IMPROVED] Replace empty interface with any (#1332) 2023-06-27 12:40:21 +02:00
Piotr Piotrowski
1bb385f044 Revert "[IMPROVED] Replace empty interface with any" (#1330)
This reverts commit af3706ecfd.
2023-06-22 10:52:40 +02:00
Piotr Piotrowski
61b0ce9bd4 [IMPROVED] Replace empty interface with any (#1315)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-06-14 20:19:55 +02:00
Piotr Piotrowski
d2c31e4f78 [FIXED] Cleanup reply sub after putting object (#1282)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-06-06 23:29:45 +02:00
Piotr Piotrowski
2396e9d12c Merge branch 'main' of https://github.com/nats-io/nats.go into jsv2 2023-05-23 12:04:18 +02:00
Piotr Piotrowski
b31e5f64c5 Merge branch 'main' of https://github.com/nats-io/nats.go into jsv2
Improve readme

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>

Fix msg size calculation

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>

Add connection event listeners

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>

Fix leaky goroutines in tests

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-05-23 12:04:01 +02:00
Piotr Piotrowski
ac403323c4 Iterator for pull consumer, refine API and fix bugs
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-05-23 11:56:55 +02:00
Piotr Piotrowski
c8b7b4bfa3 Move parse.go to internal directory 2023-05-23 11:56:26 +02:00
Piotr Piotrowski
8faa842dda [ADDED] SkipConsumerLookup option in js.Subscribe() (#1265)
Signed-off-by: Waldemar Quevedo <wally@nats.io>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Co-authored-by: Waldemar Quevedo <wally@nats.io>
2023-05-16 17:48:50 +02:00
Waldemar Quevedo
1537c0b544 Fix staticcheck, use single function for getHash
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-05-11 17:41:35 -07:00
Waldemar Quevedo
34464fbd4b js: add ConsumerName option
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-05-11 17:30:15 -07:00
Waldemar Quevedo
19782c0578 js: use similar ephemeral consumer names as server
Signed-off-by: Waldemar Quevedo <wally@nats.io>
2023-05-11 17:03:24 -07:00
Piotr Piotrowski
d313991b62 [CHANGED] Generate consumer name in Subscribe() when name is not provided (#1261)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-05-11 16:56:10 +02:00
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