This test flakes quite often on the final consumer info check because of
one consumer reporting `PushBound` and the other not. By clearing both,
this should clear up the disagreement.
Signed-off-by: Neil Twigg <neil@nats.io>
- [x] Branch rebased on top of current main (`git pull --rebase origin
dev`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [ ] Build is green in Travis CI
### Changes proposed in this pull request:
Removed `qos2` reference from the MQTT outgoing stream name and
subjects.
Rationale: As I was reviewing the documentation and thinking how to move
forward with MQTT, I am inclined to use the `$MQTT_out` stream and
session-specific consumers (as opposed to subscription-specific) for all
QOS-related packet delivery and PI persistence. I think I will be able
to repurpose it "as is", so proposing the generic name change.
Since these (stream, consumer, subscriptions) are newly introduced in
https://github.com/nats-io/nats-server/pull/4349 and have not yet been
released, this is a safe change.
This uses `TempDir` in more tests. Some were trying to manage the
directory manually, others were just not managing a directory at all.
There may be more that need doing.
Signed-off-by: Neil Twigg <neil@nats.io>
- [ ] Link to issue, e.g. `Resolves #NNN`
- [ ] Documentation added (if applicable)
- [x] Tests added
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [ ] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [ ] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)
Related: https://github.com/nats-io/nats-server/pull/4399
### Changes proposed in this pull request:
- Avoid binding to hardcoded port, as it may conflict if already in use
- Drop TLS from Core Request/Response benchmark, was not showing much
difference, not enough data going through to become a dominant cost
- Add a different core benchmark that exercises TLS by pushing through
lots of data
- [X] Link to issue, e.g. `Resolves #NNN`
- [X] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [X] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [X] Build is green in Travis CI
- [X] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)
Resolves#4459
Allows the user to set the deduplication window duration to 0s when the
stream has sources defined. Remember that if the stream in question is
also listening on subjects as well as sourcing the deduplication window
is the same for sourced and listened messages.
---------
Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
- Changed how [`byIdle`](887a4ae692/server/monitor_sort_opts.go (L97))
struct compares the idle times (was subtracting the start time from the last activity time).
- Added tests for `byIdle`.
- Changed and simplified the test
[`TestConnzSortedByIdle`](8a9f441c40/server/monitor_test.go (L1185))
(No need for the clients to publish and subscribe if we are manually
changing the client's `last` time, and we only need to test the sorting
order). Also the test was not catching the problem because the clients
`start` time was the same, now every client has a different start time.
Resolves#4462
When we fail to deliver a message for a consumer, either through
didNotDeliver() or LoadMsg() failure re-adjust delivered count and
waitingRequest accounting.
Signed-off-by: Derek Collison <derek@nats.io>
Closes#3727 by adding the ability to set `limit_max_ack_pending` and
`limit_inactive_threshold` values at the stream level, which consumers
will automatically inherit if they don't specify their own values and
will limit to if the stream limits are reduced.
Signed-off-by: Neil Twigg <neil@nats.io>
Follow up from #4437 content-type fix for v2.9.22, some fixes to the
response from `/healthz` for dev:
- In #[3326](https://github.com/nats-io/nats-server/pull/4097) it was
changed to return 500 status when before we used to return 503 so this
changes it back.
- Also as part of #3326 we started to return `status_code` in the
healthz response (e.g `{"status":"ok","status_code":200}`) so this
removes it for http responses just relying on the http header.
Resolves: no ticket
### Changes proposed in this pull request:
- rename PUBREL durable consumer from `<idhash>_pubrel` to
`$MQTT_PUBREL_<idhash>` for consistency with other durable consumer
names.