Ivan Kozlovic
b9bd5c2d35
Fixed flappers
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2020-06-09 15:34:52 -06:00
Derek Collison
c969e7e424
Do proper ubsubscribe when shutting off restore endpoint
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-06-04 08:58:14 -07:00
Derek Collison
164f44ed18
Require reply subjects for restore chunks
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-06-04 06:56:07 -07:00
Derek Collison
660ea3c807
Snapshot restore now works across leafnodes.
...
This also introduces the ability to have flow control inbound for restoring a stream.
If the system detects a reply subject it will respond with a nil payload.
For the last EOF message if a reply is present it will respond with a stream info response or error.
Signed-off-by: Derek Collison <derek@nats.io >
2020-06-03 20:00:59 -07:00
Derek Collison
afc7fc367b
Remove hdrs for now, find better way to deliver in client
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-06-02 07:10:23 -07:00
R.I.Pienaar
920dd4269a
fix argument order in snapshots
...
Signed-off-by: R.I.Pienaar <rip@devco.net >
2020-06-02 13:51:50 +02:00
Derek Collison
f6ce833751
Fix flapper
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-06-01 11:37:06 -07:00
Derek Collison
4d62a7237d
Allow redelivery for AckAll policy, general upgrades to pending beahviors. Fixes #1436
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-31 07:50:50 -07:00
Derek Collison
e584d4efee
Merge pull request #1435 from nats-io/js-hdrs
...
First pass header support for JetStream
2020-05-31 06:01:01 -07:00
Derek Collison
dbde2479c2
Add in headers to consumer delivered messages
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-30 15:03:54 -07:00
Derek Collison
eca04c6fce
First pass header support for JetStream
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-30 10:04:23 -07:00
Derek Collison
e12907ffa6
Allow snapshots to optionally check all message checksums
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-29 09:57:33 -07:00
Derek Collison
0a206b4c64
Snapshot performance tweaks
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-29 08:07:31 -07:00
Derek Collison
10e49ca1c4
Fix more flappers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-28 14:19:11 -07:00
Derek Collison
4ca05d9719
Fix gap test from flapping
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-28 13:43:15 -07:00
Derek Collison
625129f20a
Fix flapper test where no messages to receive at end
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-28 13:23:00 -07:00
Derek Collison
d3ac95a5e6
Add in a terminate delivery for https://github.com/nats-io/jetstream/issues/189
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-28 08:32:34 -07:00
Derek Collison
bc0fedbaba
Udpates based on PR feedback
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-28 06:08:35 -07:00
Derek Collison
fa59cff105
Add in snapshot and restore JSApi
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-27 20:01:30 -07:00
Derek Collison
8727315eb9
Updated snapshots, added restore, generic hashes
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-26 19:53:16 -07:00
Derek Collison
4c91b69c4f
Merge pull request #1413 from nats-io/fix_flappers
...
Fix flappers
2020-05-26 09:01:04 -07:00
Derek Collison
710ef00383
Don't allow JetStream on system account. Warn when accounts configured but no JS
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 12:17:18 -07:00
Derek Collison
3caf6265d4
Properly recover ephemeral consumers after restart
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 11:06:55 -07:00
Derek Collison
54aa40b352
Wait a bit longer to get subs
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 09:30:36 -07:00
Derek Collison
9dae2cd80f
Fixed flapper, will fix bug in other PR
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 06:58:23 -07:00
Derek Collison
b26d389d5e
Use old request style, no pause between new sends
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 06:58:23 -07:00
Ivan Kozlovic
e976e63099
Fixing some flappers
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2020-05-25 06:58:23 -07:00
Derek Collison
dae309ee30
Fix flapper, wait for no clients
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
7b6352c991
Add timestamps to stream state for first and last, addresses #1396
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
5b369ad7dc
Do not allow streams to overlap with our public API - https://github.com/nats-io/jetstream/issues/137
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
R.I.Pienaar
7a1ec0ad27
adds API type hints to responses
...
Also standardise some names of response structures and create
reusable types that can be included into others to construct
our standard API requests and responses.
Fixes some json tags.
Updates the design document of the JSON responses to reflect
the implementation that was done
Signed-off-by: R.I.Pienaar <rip@devco.net >
2020-05-19 14:33:06 -07:00
Derek Collison
3a30ef34b7
Make file state cleanup consistent for all JetStream tests
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
e9b9788fbe
Various bug fixes, fixes for flappers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
585fa8cc89
Test fails under race flag, so scale back
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:31:56 -07:00
Derek Collison
37b8988643
Return 404 codes when resources are not found
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
d36dff7d2f
Move list to names, and add list in for detailed info for streams and consumers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
5256781ba0
Addressed issues raised in https://github.com/nats-io/nats-server/pull/1369
...
API still only turned on for account info in disabled accounts. Issues with advisories. Plan is still to have all endpoints on in all accounts.
Stream list and Consumer list return names only, page limit increased to 1024.
Stream, Consumer and Template names limited to 256 for now.
Subject API for stream messages, delete and get, not have STREAM.MSG.
Subject API for Durable is now CONSUMER.DURABLE.
Subject API for Templates now STREAM.TEMPLATE.
All subject APIs for list reverted back, so STREAM.LIST, CONSUMER.LIST etc.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
cadd39a01c
Major rewrite for NATS JetStream API
...
API made more consistent. Noun followed by verb.
Name arguments in request subejcts are always at the end now.
Remove enabled call, just use account info.
Getting a message directly from a stream is treated like an admin API and requires JSON request.
Deleting a message directly as well.
StreamList and ConsumerList now include details and support paging.
Streams and Consumers now contain a created field in their info.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
5ffb500857
Be more forgiving on empty api requests, force json request for delete msg api
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
cd5ec0f2e1
Move enabled to Enabled vs JetStream in response
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
513bff051b
Redesign message-based API
...
Removed usage of +OK and -ERR. All responses are valid json objects now and optionally can include an ApiError which will have Code and Description.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
7f41b5a6ae
Added support for DiscardPolicy on streams
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
50443ead89
Change to consumer info, removed state, made pending and redelivery counts
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
7d7a9e8f23
Make sure messages are not redelivered if ack'd late (pull-based this can happen)
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
0bf6b2afbc
Allow addition of streams and consumers (durables) with same config to be acceptable
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
R.I.Pienaar
fb37c121d1
expose the arrival timestamp in the message metadata
...
Signed-off-by: R.I.Pienaar <rip@devco.net >
2020-05-19 14:21:27 -07:00
Derek Collison
0a36706958
PubAck details that provide stream name and sequence assigned
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
4139777ea8
First pass at account config for jetstream server reload support
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
b5daac9638
Properly parse and use jetstream server config
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
ec0bc1dbec
First pass account configuration for jetstream
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00