Commit Graph

352 Commits

Author SHA1 Message Date
David Ansari 8c4e2e009d Log at debug level when state machine terminates 2021-06-26 14:02:00 +02:00
David Ansari 81ee05f9ce Convert rabbit_stream_reader into state machine
This is pure refactoring - no functional change.

Benefits:
* code is more maintainable
* smaller methods (instead of previous 350 lines listen_loop_post_auth function)
* well defined state transitions (e.g. useful to enforce authentication protocol)
* we get some gen_statem helper functions for free (e.g. debug utilities)

Useful doc: https://ninenines.eu/docs/en/ranch/2.0/guide/protocols/
2021-06-25 15:07:34 +02:00
David Ansari ff174eaa5f Add behaviour declaration for rabbit_stream_metrics_gc
since it implements a gen_server.
2021-06-25 11:57:14 +02:00
Philip Kuryloski a3c97d491f Update additional test skipping for 3.8/3.9 mixed versions 2021-06-25 11:17:46 +02:00
Philip Kuryloski bb75157fc1 Mark deps/rabbitmq_stream:commands_SUITE as flaky 2021-06-24 12:56:20 +02:00
Philip Kuryloski 8c7e7e0656 Revert "Default all `rabbitmq_integration_suite` to flaky in bazel"
This reverts commit 70cb8147b2.
2021-06-23 20:53:14 +02:00
Gerhard Lazu c7971252cd
Global counters per protocol + protocol AND queue_type
This way we can show how many messages were received via a certain
protocol (stream is the second real protocol besides the default amqp091
one), as well as by queue type, which is something that many asked for a
really long time.

The most important aspect is that we can also see them by protocol AND
queue_type, which becomes very important for Streams, which have
different rules from regular queues (e.g. for example, consuming
messages is non-destructive, and deep queue backlogs - think billions of
messages - are normal). Alerting and consumer scaling due to deep
backlogs will now work correctly, as we can distinguish between regular
queues & streams.

This has gone through a few cycles, with @mkuratczyk & @dcorbacho
covering most of the ground. @dcorbacho had most of this in
https://github.com/rabbitmq/rabbitmq-server/pull/3045, but the main
branch went through a few changes in the meantime. Rather than resolving
all the conflicts, and then making the necessary changes, we (@gerhard +
@kjnilsson) took all learnings and started re-applying a lot of the
existing code from #3045. We are confident in this approach and would
like to see it through. We continued working on this with @dumbbell, and
the most important changes are captured in
https://github.com/rabbitmq/seshat/pull/1.

We expose these global counters in rabbitmq_prometheus via a new
collector. We don't want to keep modifying the existing collector, which
grew really complex in parts, especially since we introduced
aggregation, but start with a new namespace, `rabbitmq_global_`, and
continue building on top of it. The idea is to build in parallel, and
slowly transition to the new metrics, because semantically the changes
are too big since streams, and we have been discussing protocol-specific
metrics with @kjnilsson, which makes me think that this approach is
least disruptive and... simple.

While at this, we removed redundant empty return value handling in the
channel. The function called no longer returns this.

Also removed all DONE / TODO & other comments - we'll handle them when
the time comes, no need to leave TODO reminders.

Pairs @kjnilsson @dcorbacho @dumbbell
(this is multiple commits squashed into one)

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-06-22 14:14:21 +01:00
Philip Kuryloski 70cb8147b2 Default all `rabbitmq_integration_suite` to flaky in bazel
Most tests that can start rabbitmq nodes have some chance of
flaking. Rather than chase individual flakes for now, this commit
changes the default (though it can still be overriden, as is the case
for config_scheme_SUITE in many places, since I have yet to see that
particular suite flake).
2021-06-21 16:10:38 +02:00
Philip Kuryloski eea51a7e3a Mark additional suites as flaky 2021-06-17 13:42:22 +02:00
Philip Kuryloski a3bffb4d18 Fixup bazel compilation for rabbitmq_stream_common 2021-06-14 10:07:49 +02:00
dcorbacho 38f474688f Stream common library 2021-06-11 17:24:00 +02:00
Michael Klishin 0d84dc1e48
Merge pull request #3098 from rabbitmq/unexpected-socket-input
Close stream socket if client doesn't follow authentication protocol
2021-06-11 03:25:45 +03:00
David Ansari 1cca0f1e4c Categorize connection log messages 2021-06-10 19:50:48 +02:00
David Ansari fcc8dbeab6 Close client connections that don't follow authentication protocol
Before this commit sending garbarge data to the server stream port
caused the RabbitMQ node to eat more and more memory.

In this commit, we fix it by expecting the client to go through the
proper authentication sequence. Otherwise, the server closes the socket.

Co-authored-by: Michal Kuratczyk <mkuratczyk@pivotal.io>
2021-06-10 15:44:51 +02:00
Arnaud Cogoluègnes dcd65572a0
Remove correlation ID from commit_offset
In stream protocol. commit_offset is asynchronous and does
not expect a response, so the correlation ID is not required.
2021-06-10 15:21:38 +02:00
Arnaud Cogoluègnes b77fb27af3
Merge pull request #3083 from rabbitmq/raw-reader
Raw reader option
2021-06-08 17:48:20 +02:00
dcorbacho 935f57b608 Chunk selector option in offset reader 2021-06-08 15:17:22 +02:00
Michal Kuratczyk 7407a5a100 Apply policy in rabbit_queue_type 2021-06-07 12:30:33 +02:00
Arnaud Cogoluègnes 7d5c8f402a
Merge pull request #3071 from rabbitmq/subscribe-props
Fix properties binary construction
2021-06-03 18:09:52 +02:00
Philip Kuryloski c3c9b3fc50 Merge branch 'bazel-dialyze' 2021-06-01 10:31:29 +02:00
Philip Kuryloski 30f9a95b9f Add dialyze for remaning tier-1 plugins 2021-06-01 10:19:10 +02:00
Arnaud Cogoluègnes 761af0a7a0
Extract publishing IDs from batch publishing
In stream plugin, to e.g. send publish errors in case the stream
does not exist. Batches were not taken into account.
2021-05-31 15:35:10 +02:00
dcorbacho 65c9dae53f Fix properties binary construction 2021-05-28 15:45:19 +02:00
Karl Nilsson f36751aa6d make rabbit_stream_SUITE more reliable
By having rabbit_stream_core cache it's incoming command internally.
2021-05-27 13:15:55 +01:00
Philip Kuryloski f251815002 Replace rabbitmq_stream test helper with common version
from rabbitmq_ct_helpers

and update default app env for bazel, to match Makefile
2021-05-27 12:26:51 +02:00
Arnaud Cogoluègnes 2ab5cb22ca
Expose TLS info for stream connections (CLI, REST API) 2021-05-27 10:43:33 +02:00
Arnaud Cogoluègnes 5a6dbef372
Return TLS port in stream connection properties 2021-05-26 12:30:54 +02:00
Arnaud Cogoluègnes 69ad6969e6
Add stream.advertised_tls_port setting 2021-05-26 11:08:43 +02:00
Arnaud Cogoluègnes 35ef1e5ade
Merge pull request #3038 from rabbitmq/stream-tls
TLS support for streams
2021-05-25 15:39:40 +02:00
dcorbacho 05bd6dd838 Test multiple chunks 2021-05-25 14:25:38 +02:00
Philip Kuryloski a6f70b8dda Add xref for remaining tier-1 plugins 2021-05-25 11:39:03 +02:00
Arnaud Cogoluègnes b7a2e9a792
Fix comment 2021-05-25 09:53:04 +02:00
Karl Nilsson 4a9d8115f8 rebase fixes
post rebase test fixes

Make socket initialisation more lenient

correct return types

fix

remove commented code
2021-05-24 15:53:10 +01:00
dcorbacho 3fefa8e8d4 Use ssl option when initialising data reader 2021-05-21 17:13:15 +01:00
dcorbacho 8f54150867 Add stream TLS test 2021-05-21 17:10:55 +01:00
dcorbacho b2a7884a45 TLS support for streams 2021-05-21 16:40:57 +01:00
Karl Nilsson 03063f2eed
Merge pull request #3043 from rabbitmq/streams-consumer-lag-metrics
Add consumer offset_lag to rabbitmq-stream CLI command & Management
2021-05-21 16:38:50 +01:00
Gerhard Lazu 080b0771cf
Fix test_gc_consumers test
Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-05-21 13:02:48 +01:00
Gerhard Lazu f8b4e1e298
Add consumer offset_lag to rabbitmq-stream CLI command & Management
This is an important metric to keep track of and be aware (maybe even
alert on) when consumers fall behind consuming stream messages. While
they should be able to catch up, if they fall behind too much and the
stream gets truncated, they may miss on messages.

This is something that we want to expose via Prometheus metrics as well,
but we've started closer to the core, CLI & Management.

This should be merged as soon as it passes CI, we shouldn't wait on the
Prometheus changes - they can come later.

Pair: @kjnilsson

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2021-05-21 13:02:48 +01:00
Arnaud Cogoluègnes 8f8e08a9a9
Send advertised host and port in open
More secure than in peer properties frame, which is just
at the beginning of the connection opening.
2021-05-21 13:03:38 +02:00
Michal Kuratczyk 6c38b42ad6 Log heartbets at debug; remove newlines
A log line every minute about a successful heartbeat pollutes the logs.
So do empty log lines.
2021-05-20 18:46:15 +02:00
Arnaud Cogoluègnes c30e013d7a
Rename max-segment-size to stream-max-segment-size-bytes 2021-05-20 10:16:19 +02:00
Arnaud Cogoluègnes c42930acb0
Set stream plugin default port to 5552 2021-05-19 15:38:52 +02:00
Karl Nilsson ef52b92390 Make stream consumer arg parsing return error
when receiving unexpected input
2021-05-19 12:00:10 +01:00
Arnaud Cogoluègnes c15805b472
Fix stream protocol open origin
Client, not server.
2021-05-19 12:34:35 +02:00
Arnaud Cogoluègnes 7adac7a71b
Add subscription properties to stream protocol 2021-05-19 12:26:30 +02:00
Arnaud Cogoluègnes 0b73c9337c
Fix some logging statements in stream plugin
Missing arguments in the format.
2021-05-19 11:22:15 +02:00
Arnaud Cogoluègnes d9b7523987
Handle connection closing when dispatching stream messages 2021-05-19 10:05:37 +02:00
Arnaud Cogoluègnes 7145a1a2ad
Trigger event on stream consumer cancellation
To make metrics are cleaned up.
2021-05-18 17:42:33 +02:00
Arnaud Cogoluègnes 194198a450
Add stream consumer properties to list command 2021-05-18 17:16:06 +02:00
Arnaud Cogoluègnes 67546a60ca
Fix stream test suite 2021-05-18 17:03:21 +02:00
Arnaud Cogoluègnes 77b99a2efd
Add stream subscription properties to metrics 2021-05-18 16:54:41 +02:00
Arnaud Cogoluègnes 7a32a4483f
Use ~0p to print map on one line 2021-05-18 14:52:12 +02:00
Philip Kuryloski 5d06930b8d Add rabbit_stream_core_SUITE to bazel 2021-05-18 12:45:34 +02:00
Karl Nilsson 90a8c11450 Stream: tweak type and tidy up 2021-05-18 10:02:38 +01:00
Arnaud Cogoluègnes 28f3de7f2a
Support properties in stream subscription
To add metadata. Can be used to map a subscription to
the commit offset reference.
2021-05-18 10:15:26 +02:00
Karl Nilsson 79502ef663 fix tests 2021-05-17 10:39:55 +01:00
Karl Nilsson 312690315d rabbit_stream_core: remove duplicate clause 2021-05-17 10:39:55 +01:00
Karl Nilsson a5cc3b28e4 remove unused function 2021-05-17 10:39:55 +01:00
Karl Nilsson b21966cf86 stream plugin: use core module in test suite
this implements a basic "client" and tests the core module on both server and client.
2021-05-17 10:39:55 +01:00
kjnilsson a1ce34c1b8 Extract stream protocol framing and binary generation
into a separate module.
2021-05-17 10:39:52 +01:00
Philip Kuryloski 4f3b068886 Fix for a compiler warning in Erlang 24 2021-05-17 11:09:19 +02:00
Arnaud Cogoluègnes e5101c2bfd
Bump JUnit in stream-related Java test suite 2021-05-17 09:32:30 +02:00
Philip Kuryloski e6df6615e1 Futher bazel file refactoring and deduplication 2021-05-11 16:15:33 +02:00
Philip Kuryloski a9159834e7 Add rabbitmq_stream to bazel 2021-05-06 12:27:42 +02:00
Arnaud Cogoluègnes 787b46e3a1
Propagate advertised host and port to client 2021-05-03 10:32:33 +02:00
Arnaud Cogoluègnes e3c4c9a471
Use stream leader to query offset 2021-04-27 15:38:21 +02:00
Arnaud Cogoluègnes e4307b6180
Adapt stream code to osiris tracking types introduction 2021-04-27 09:44:59 +02:00
Arnaud Cogoluègnes 39f8be929d
Block stream publishing on disk alarm 2021-04-20 16:49:01 +02:00
Arnaud Cogoluègnes 5d218b85cf
Remove stream plugin instructions
No longer valid, use the usual process to run a plugin.
2021-04-16 20:20:20 +02:00
kjnilsson 9bd02b3510 Make streams compatible with osiris API changes
In osiris:init_reader
2021-04-13 15:02:32 +01:00
Arnaud Cogoluègnes c70de74c5e
Handle "undefined" PID when writing osiris tracking 2021-04-09 15:45:28 +02:00
Arnaud Cogoluègnes 88154a72d0
Handle closed osiris reader when dispatching chunk 2021-04-09 15:26:06 +02:00
Arnaud Cogoluègnes 23aee072eb
Handle creation of stream with different parameters 2021-04-08 15:50:51 +02:00
Arnaud Cogoluègnes 3b69f4b630
Handle 4 reserved bytes in osiris chunk
References rabbitmq/osiris#22
2021-03-30 09:45:29 +02:00
Philip Kuryloski a63f169fcb Remove duplicate rabbitmq-components.mk and erlang.mk files
Also adjust the references in rabbitmq-components.mk to account for
post monorepo locations
2021-03-22 15:40:19 +01:00
kjnilsson 52f745dcde Update rabbitmq-components.mk
use v1.x branch of ra
2021-03-18 15:14:40 +00:00
Karl Nilsson 1b7379d266
Merge pull request #2876 from rabbitmq/stream-coord-refactor
Stream Coordinator refactor
2021-03-16 11:10:44 +00:00
Arnaud Cogoluègnes e46216b5a8 Check PID on leader lookup in stream plugin
To make sure the PID is alive, as the mnesia record can stale after a
failure.

Make also the local PID lookup in the stream coordinator do a consistent
query over the cluster if the PID is not alive.

Co-authored-by: Karl Nilsson <kjnilsson@users.noreply.github.com>
2021-03-12 15:04:40 +00:00
Arnaud Cogoluègnes e80db9d46a Adapt stream plugin after coordinator refactoring
Do not use mnesia record for topology info, use coordinator instead.
2021-03-12 15:04:35 +00:00
Loïc Hoguin d5e3bdd623
Add ADDITIONAL_PLUGINS variable
This allows including additional applications or third party
plugins when creating a release, running the broker locally,
or just building from the top-level Makefile.

To include Looking Glass in a release, for example:

$ make package-generic-unix ADDITIONAL_PLUGINS="looking_glass"

A Docker image can then be built using this release and will
contain Looking Glass:

$ make docker-image

Beware macOS users! Applications such as Looking Glass include
NIFs. NIFs must be compiled in the right environment. If you
are building a Docker image then make sure to build the NIF
on Linux! In the two steps above, this corresponds to Step 1.

To run the broker with Looking Glass available:

$ make run-broker ADDITIONAL_PLUGINS="looking_glass"

This commit also moves Looking Glass dependency information
into rabbitmq-components.mk so it is available at all times.
2021-03-12 12:29:28 +01:00
Michael Klishin 97ff62d3b2
Drop trailing newlines from logged messages where possible
Lager strips trailing newline characters but OTP logger with the default
formatter adds a newline at the end. To avoid unintentional multi-line log
messages we have to revisit most messages logged.

Some log entries are intentionally multiline, others
are printed to stdout directly: newlines are required there
for sensible formatting.
2021-03-11 15:17:37 +01:00
Jean-Sébastien Pédron cdcf602749
Switch from Lager to the new Erlang Logger API for logging
The configuration remains the same for the end-user. The only exception
is the log root directory: it is now set through the `log_root`
application env. variable in `rabbit`. People using the Cuttlefish-based
configuration file are not affected by this exception.

The main change is how the logging facility is configured. It now
happens in `rabbit_prelaunch_logging`. The `rabbit_lager` module is
removed.

The supported outputs remain the same: the console, text files, the
`amq.rabbitmq.log` exchange and syslog.

The message text format slightly changed: the timestamp is more precise
(now to the microsecond) and the level can be abbreviated to always be
4-character long to align all messages and improve readability. Here is
an example:

    2021-03-03 10:22:30.377392+01:00 [dbug] <0.229.0> == Prelaunch DONE ==
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Starting RabbitMQ 3.8.10+115.g071f3fb on Erlang 23.2.5
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Licensed under the MPL 2.0. Website: https://rabbitmq.com

The example above also shows that multiline messages are supported and
each line is prepended with the same prefix (the timestamp, the level
and the Erlang process PID).

JSON is also supported as a message format and now for any outputs.
Indeed, it is possible to use it with e.g. syslog or the exchange. Here
is an example of a JSON-formatted message sent to syslog:

    Mar  3 11:23:06 localhost rabbitmq-server[27908] <0.229.0> - {"time":"2021-03-03T11:23:06.998466+01:00","level":"notice","msg":"Logging: configured log handlers are now ACTIVE","meta":{"domain":"rabbitmq.prelaunch","file":"src/rabbit_prelaunch_logging.erl","gl":"<0.228.0>","line":311,"mfa":["rabbit_prelaunch_logging","configure_logger",1],"pid":"<0.229.0>"}}

For quick testing, the values accepted by the `$RABBITMQ_LOGS`
environment variables were extended:
  * `-` still means stdout
  * `-stderr` means stderr
  * `syslog:` means syslog on localhost
  * `exchange:` means logging to `amq.rabbitmq.log`

`$RABBITMQ_LOG` was also extended. It now accepts a `+json` modifier (in
addition to the existing `+color` one). With that modifier, messages are
formatted as JSON intead of plain text.

The `rabbitmqctl rotate_logs` command is deprecated. The reason is
Logger does not expose a function to force log rotation. However, it
will detect when a file was rotated by an external tool.

From a developer point of view, the old `rabbit_log*` API remains
supported, though it is now deprecated. It is implemented as regular
modules: there is no `parse_transform` involved anymore.

In the code, it is recommended to use the new Logger macros. For
instance, `?LOG_INFO(Format, Args)`. If possible, messages should be
augmented with some metadata. For instance (note the map after the
message):

    ?LOG_NOTICE("Logging: switching to configured handler(s); following "
                "messages may not be visible in this log output",
                #{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),

Domains in Erlang Logger parlance are the way to categorize messages.
Some predefined domains, matching previous categories, are currently
defined in `rabbit_common/include/logging.hrl` or headers in the
relevant plugins for plugin-specific categories.

At this point, very few messages have been converted from the old
`rabbit_log*` API to the new macros. It can be done gradually when
working on a particular module or logging.

The Erlang builtin console/file handler, `logger_std_h`, has been forked
because it lacks date-based file rotation. The configuration of
date-based rotation is identical to Lager. Once the dust has settled for
this feature, the goal is to submit it upstream for inclusion in Erlang.
The forked module is calld `rabbit_logger_std_h` and is based
`logger_std_h` in Erlang 23.0.
2021-03-11 15:17:36 +01:00
Michael Klishin 570eb509c2
Naming 2021-03-10 07:45:49 +03:00
dcorbacho e0d567828f Update ranch supervisor structure on list/0 command 2021-03-09 23:17:03 +01:00
dcorbacho 61f7b2a723 Update to ranch 2.0 2021-03-08 23:11:05 +01:00
Michael Klishin b6c4831e75
Bump Lager to 3.9.1 2021-03-04 04:36:39 +03:00
Loïc Hoguin 66ac1bf5e9
Bump observer_cli to 1.6.1
More responsive when the system is overloaded with file calls.
2021-03-01 21:55:27 +03:00
Arnaud Cogoluègnes 15ebf7c87a
Add comment 2021-03-01 21:55:25 +03:00
Arnaud Cogoluègnes 68478c5fc2
Use unsigned ints in stream protocol, when appropriate 2021-03-01 21:55:25 +03:00
Arnaud Cogoluègnes 076bb22bd0
Start constants at 1 for stream plugin 2021-03-01 21:55:24 +03:00
Arnaud Cogoluègnes ad0a2cd1b9
Use MSB in keys to distinguish requests/responses
In stream protocol.
2021-03-01 21:55:24 +03:00
Michael Klishin 8fe3df9343
Upgrade Lager to 3.9.0 for OTP 24 compatibility
`lager_util:expand_path/1` use changes are
due to erlang-lager/lager#540
2021-02-26 00:52:15 +03:00
Arnaud Cogoluègnes b39f4a6d1d
Set stream plugin default port to 5551
Instead of 5555, which is already registered.
2021-02-25 18:16:32 +01:00
Arnaud Cogoluègnes d70b55aa0c
Add route and partitions command to stream plugin
For publishing to super streams.
2021-02-25 17:22:42 +01:00
Michael Klishin f73e851f9c
Bump observer_cli to 1.6.0 2021-02-24 12:53:55 +03:00
Michael Klishin a5098b28a7
Bump Lager to 3.8.2 for OTP 24 compatibility 2021-02-24 12:53:30 +03:00
Arnaud Cogoluègnes 047e87137c
No global response code for metadata in stream protocol 2021-02-22 15:24:24 +01:00
Arnaud Cogoluègnes 9696861181
Fix stream protocol documentation after review 2021-02-22 15:19:58 +01:00
Arnaud Cogoluègnes b61be1e409
Mention stream protocol responses can have extra info 2021-02-22 11:42:34 +01:00
Arnaud Cogoluègnes 8868ad97b3
Add logging to stream subscription 2021-02-11 16:16:26 +01:00
Arnaud Cogoluègnes d63756ed67
Set correct offset metrics on stream consumer creation 2021-02-09 11:36:20 +01:00
Arnaud Cogoluègnes 3de198845f
Disable stream failure test 2021-01-27 17:54:35 +01:00
Arnaud Cogoluègnes b921ac11a8
Merge pull request #2712 from rabbitmq/rabbitmq-stream-prometheus
Add stream prometheus plugin
2021-01-27 16:46:37 +01:00
Arnaud Cogoluègnes 268bc7257c
Merge pull request #2729 from rabbitmq/rabbitmq-stream-consumers-in-queue-details
Report stream consumers as regular consumers in management
2021-01-27 16:06:59 +01:00
Arnaud Cogoluègnes ce7851b470
Disable stream failure test until coordinator is fixed 2021-01-21 16:35:13 +01:00
Arnaud Cogoluègnes 78b723d7c3
Report stream consumers as regular consumers in management
This helps to see that a queue is consumed from.

WIP
2021-01-20 15:36:16 +01:00
Arnaud Cogoluègnes e87581f14c
Remove unnecessary dependencies 2021-01-19 15:04:59 +01:00
Arnaud Cogoluègnes 2f903843e0
Add list_stream_publishers CLI command 2021-01-19 14:49:30 +01:00
Arnaud Cogoluègnes 1e6244990c
Add list_stream_consumers CLI command 2021-01-19 11:31:39 +01:00
Arnaud Cogoluègnes a559c79b8c
Add response codes to stream protocol page 2021-01-18 14:25:24 +01:00
Arnaud Cogoluègnes b5315c0166
Merge branch 'master' into rabbitmq-stream-prometheus 2021-01-18 11:26:06 +01:00
Arnaud Cogoluègnes 0d73b58be0
Re-order stream command constants
The order is more usage-oriented.
2021-01-18 11:25:21 +01:00
Arnaud Cogoluègnes 52aa2963f5
Bump test dependencies in stream plugins 2021-01-14 17:58:38 +01:00
Arnaud Cogoluègnes bf72683eb2
Add stream prometheus plugin 2021-01-11 16:49:56 +01:00
Arnaud Cogoluègnes 5f0df3bdb0
Format stream and stream management plugins code 2021-01-06 15:47:27 +01:00
Arnaud Cogoluègnes 07b9e68ff5
Add logs to some stream tests 2021-01-06 14:38:02 +01:00
dcorbacho fc88f3ba21 Check that the queue exists before calling declare
Rabbit channels are responsible of this check before calling declare,
skipping it on the manager meant that the queue was partly redeclared
and a new data directory created. The old one was still on disk with
a different timestamp, but from the user point of view the queue data
has been erased.
2020-12-23 12:18:33 +01:00
Arnaud Cogoluègnes c0bb7ec4a7
Add offset & consumed metrics to stream consumer 2020-12-15 15:37:26 +01:00
Arnaud Cogoluègnes c4d07467da
Merge branch 'master' into rabbitmq-stream-management 2020-12-09 12:00:56 +01:00
Arnaud Cogoluègnes 9a590647b3
Add chunk header parameter to send_file callback 2020-12-09 11:33:28 +01:00
Arnaud Cogoluègnes e5ed53c5e2
Merge branch 'master' into rabbitmq-stream-management 2020-12-08 11:41:22 +01:00
Arnaud Cogoluègnes 87837f857d
Fix failure tests in stream plugin 2020-12-08 11:40:38 +01:00
Arnaud Cogoluègnes 846b36bec6
Fix metrics table GC test in stream plugin 2020-12-08 09:47:38 +01:00
Arnaud Cogoluègnes 2b45d8635b
Add publisher reference to stream endpoint 2020-12-07 10:17:01 +01:00
Arnaud Cogoluègnes 1faeaad499
Add publisher REST endpoint to stream consumer management 2020-12-04 17:22:14 +01:00
Arnaud Cogoluègnes 224e9914b2
Merge branch 'master' into rabbitmq-stream-management 2020-12-04 10:26:42 +01:00
Arnaud Cogoluègnes c51e060a07
Wait longer for replicas to come up in stream plugin 2020-12-04 09:48:56 +01:00
Arnaud Cogoluègnes 88b4ddb6c2
Track publishers in stream plugin 2020-12-03 17:57:48 +01:00
Arnaud Cogoluègnes c14c9bb6da
Fix some dialyzer warnings in stream plugin 2020-12-03 10:09:29 +01:00
Arnaud Cogoluègnes 66867a4062
Add GC to stream consumer monitoring table 2020-12-02 18:12:45 +01:00
Arnaud Cogoluègnes 41160210ab
Start stream consumer REST endpoint 2020-12-01 18:23:22 +01:00
Arnaud Cogoluègnes 08891a734e
Merge branch 'master' into rabbitmq-stream-management 2020-11-30 09:42:54 +01:00
Arnaud Cogoluègnes 67308be13c
Remove stream field from publish command
Only the publisher ID is necessary now the publisher declaration is
mandatory before publishing.
2020-11-27 11:07:10 +01:00
Arnaud Cogoluègnes bfa541a095
Include publisher state management 2020-11-26 18:18:43 +01:00
Arnaud Cogoluègnes 8cf5fb0775
Enforce publisher ID uniqueness 2020-11-26 15:19:02 +01:00
Arnaud Cogoluègnes 59bc60fe36
Add query publisher sequence 2020-11-26 10:02:13 +01:00
Arnaud Cogoluègnes 9859714f0e
Declare publisher in stream test 2020-11-24 18:18:14 +01:00
Arnaud Cogoluègnes 8f97ea400a
Start adding publishing dedup support for streams 2020-11-24 17:48:41 +01:00
Arnaud Cogoluègnes 584811582b
Add first tests for stream management
They are using Java to have a proper stream client.
2020-11-23 11:23:29 +01:00
Arnaud Cogoluègnes 580beb21bf
Include publish dedup in stream protocol 2020-11-20 11:43:04 +01:00
Arnaud Cogoluègnes c8249a304f
Filter stream connections where metrics are disabled
This implied defining the protocol field in tracked connection to be
able to filter out non-stream connections.
2020-11-20 09:29:55 +01:00
Arnaud Cogoluègnes e516aab737
Display only stream connections in plugin 2020-11-19 17:02:35 +01:00
Arnaud Cogoluègnes 23d7e8114c
Introduce stream management plugin 2020-11-19 14:48:25 +01:00
Arnaud Cogoluègnes 1ed8f76eed
Check if member processes are alive in metadata command
In case the Mnesia record is stale.
2020-11-17 10:15:09 +01:00
Arnaud Cogoluègnes 29e74cbfca Move some code to utils module 2020-11-05 15:33:13 +01:00
Arnaud Cogoluègnes fa586140d3 Call rabbit_log:warning/2 2020-11-03 18:04:22 +01:00
Arnaud Cogoluègnes d2eda4cb79 Update rabbitmq-components.mk 2020-11-03 14:27:50 +01:00
Arnaud Cogoluègnes 0f569d705a Return Erlang node long name in metadata
Fixes #2
2020-11-03 11:45:22 +01:00
Arnaud Cogoluègnes 2813356682 Use non_amqp_connection name for force_refresh_event 2020-10-23 15:37:07 +02:00