Commit Graph

448 Commits

Author SHA1 Message Date
Diana Parra Corbacho d4148cd611 Mqtt test: Solve dependencies for web mqtt 2025-06-11 09:44:14 +02:00
Michael Klishin 0c5b3da55a
Expand #13947 to web_mqtt and web_stomp 2025-06-04 21:34:52 +04:00
David Ansari 98d6973b01 Add missing test
Follow up of https://github.com/rabbitmq/rabbitmq-server/pull/14006
2025-06-04 18:37:55 +02:00
Michael Klishin 24464a6c9b
Propagate one more Web MQTT test #14006
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
2025-06-04 19:41:09 +04:00
Marcial Rosales 57ef5ea64f Delete mqtt qos0 when connection closes 2025-06-04 10:49:19 +02:00
Diana Parra Corbacho d91c9d61d4
web_mqtt: propagate notify_consumer_quorum/qos0_queue_deleted to mqtt_shared_SUITE 2025-06-03 00:40:04 +04:00
Michael Klishin 9eaa22066b
web_mqtt: propagate notify_consumer_classic_queue_deleted to mqtt_shared_SUITE 2025-06-03 00:40:04 +04:00
David Ansari 21bd300d61 Support outgoing message interceptors 2025-04-23 14:01:42 +02:00
Loïc Hoguin c5d150a7ef
Use Erlang.mk's native Elixir support for CLI
This avoids using Mix while compiling which simplifies
a number of things and let us do further build improvements
later on.

Elixir is only enabled from within rabbitmq_cli currently.

Eunit is disabled since there are only Elixir tests.

Dialyzer will force-enable Elixir in order to process
Elixir-compiled beam files.

This commit also includes a few changes that are
related:

 * The Erlang distribution will now be started for parallel-ct

 * Many unnecessary PROJECT_MOD lines have been removed

 * `eunit_formatters` has been removed, it provides little value

 * The new `maybe_flock` Erlang.mk function is used where possible

 * Build test deps when testing rabbitmq_cli (Mix won't do it anymore)

 * rabbitmq_ct_helpers now use the early plugins to have Dialyzer
   properly set up
2025-03-18 10:02:49 +01:00
Aitor Perez 07adc3e571
Remove Bazel files 2025-03-13 13:42:34 +00:00
GitHub a013bb1d1c bazel run gazelle 2025-01-28 04:02:47 +00:00
David Ansari 579c58603e Support AMQP over WebSocket (OSS part) 2025-01-27 17:50:47 +01:00
Michael Klishin 968eefa1bb
Bump (c) line year
There are no functional changes to this massive diff.
2025-01-01 17:54:10 -05:00
David Ansari 667e35a634 Remove rabbit_common from MQTT dependencies 2024-12-23 11:22:22 +01:00
Michael Klishin f3540ee7d2
web_mqtt_shared_SUITE: propagate flow_classic_queue to mqtt_shared_SUITE #12907 12906 2024-12-09 23:13:55 -05:00
David Ansari 3db4a97cfb Expose AMQP connection metrics
Expose the same metrics for AMQP 1.0 connections as for AMQP 0.9.1 connections.

Display the following AMQP 1.0 metrics on the Management UI:
* Network bytes per second from/to client on connections page
* Number of sessions/channels on connections page
* Network bytes per second from/to client graph on connection page
* Reductions graph on connection page
* Garbage colletion info on connection page

Expose the following AMQP 1.0 per-object Prometheus metrics:
* rabbitmq_connection_incoming_bytes_total
* rabbitmq_connection_outgoing_bytes_total
* rabbitmq_connection_process_reductions_total
* rabbitmq_connection_incoming_packets_total
* rabbitmq_connection_outgoing_packets_total
* rabbitmq_connection_pending_packets
* rabbitmq_connection_channels

The rabbit_amqp_writer proc:
* notifies the rabbit_amqp_reader proc if it sent frames
* hibernates eventually if it doesn't send any frames

The rabbit_amqp_reader proc:
* does not emit stats (update ETS tables) if no frames are received
or sent to save resources when there are many idle connections.
2024-11-02 19:08:24 +01:00
David Ansari db92f48dae bazel run gazelle 2024-10-01 18:02:00 +02:00
Loïc Hoguin a0ee6ddb69
Bazel fixes following renaming of test suites 2024-09-30 12:35:44 +02:00
Loïc Hoguin 027700eec2
Add missing test case to web_mqtt_shared_SUITE 2024-09-30 12:35:44 +02:00
David Ansari f002029ebd
Do not open WebMQTT connection in MQTT plugin 2024-09-30 12:35:41 +02:00
Loïc Hoguin ddab3d523f
mqtt tests: Move v5 web_mqtt tests out of rabbitmq_mqtt 2024-09-30 12:35:41 +02:00
Loïc Hoguin 690b830e43
mqtt tests: Move web_mqtt tests out of rabbitmq_mqtt
The shared test suite was renamed only for clarity, but the
Web-MQTT test suites were renamed out of necessity: since
we are now adding the MQTT test directory to the code path
we need test suites to have different names to avoid
conflicts. We can't (easily) addpath only for this test suite
either since CT hooks don't call functions in a predictable
enough manner; it would always be hacky.
2024-09-30 12:35:41 +02:00
Michael Klishin 8b90d4a27c Allow for tagged values for a few more rabbitmq.conf settings 2024-08-13 16:27:00 -04:00
David Ansari 7fb78338c6 Disconnect MQTT client when its credential expires
Fixes https://github.com/rabbitmq/rabbitmq-server/discussions/11854
Fixes https://github.com/rabbitmq/rabbitmq-server/issues/11862

This commit uses the same approach as implemented for AMQP 1.0 and
Streams: When a token expires, RabbitMQ will close the connection.
2024-07-30 19:55:46 +02:00
David Ansari 50116f0927 Require MQTT feature flags in 4.0
Require all MQTT feature flags and remove their compatibility code:
* delete_ra_cluster_mqtt_node
* rabbit_mqtt_qos0_queue
* mqtt_v5

These feature flags were introduced in or before 3.13.0.
2024-07-10 10:27:59 +02:00
Loïc Hoguin bbfa066d79
Cleanup .gitignore files for the monorepo
We don't need to duplicate so many patterns in so many
files since we have a monorepo (and want to keep it).

If I managed to miss something or remove something that
should stay, please put it back. Note that monorepo-wide
patterns should go in the top-level .gitignore file.
Other .gitignore files are for application or folder-
specific patterns.
2024-06-28 12:00:52 +02:00
Loïc Hoguin 49bedfc17e
Remove most of the fd related FHC code
Stats were not removed, including management UI stats
relating to FDs.

Web-MQTT and Web-STOMP configuration relating to FHC
were not removed.

The file_handle_cache itself must be kept until we
remove CQv1.
2024-06-24 12:07:51 +02:00
Michal Kuratczyk 27f735f49e
Use emqx/emqtt instead of a fork (#11479)
* Use emqx/emqtt instead of a fork
* Specify SNI in test connections (otherwise OTP26 secure TLS defaults make some tests fail)
2024-06-19 14:03:30 +02:00
Rin Kuryloski 5debebfaf3 Use rules_elixir to build the cli without mix
Certain elixir-native deps are still build with mix, but this can be
corrected later
2024-06-18 14:50:34 +02:00
Rin Kuryloski 4ffabad4cb Add cowlib to PLT_APPS for some plugins 2024-04-29 16:15:39 +02:00
Rin Kuryloski 9ed6155c0d Add elixir to PLT_APPS for some plugins 2024-04-29 15:23:09 +02:00
Rin Kuryloski 6a9d668def Set PLT_APPS in a number of plugins where it was missing 2024-04-29 14:54:28 +02:00
David Ansari 3fd96b509a Avoid rabbit_ct_helpers:is_mixed_versions/0
Fixes https://github.com/rabbitmq/rabbitmq-server/pull/10761#discussion_r1528039577 :
"Could you please check a real condition that the old
version can't be used as part of this test?
is_mixed_versions() will still return true in 10 years
when testing RabbitMQ 21.x against 22.x. This function should
almost never be used."
2024-03-21 16:42:57 +01:00
David Ansari 4b9574571b Move macro to the correct Erlang app
The Web MQTT link is not used in the rabbitmq_mqtt Erlang app.
This link is only used in the rabbitmq_web_mqtt Erlang app.
Hence, move the link to the correct Erlang app.
2024-03-21 16:29:11 +01:00
Michael Klishin e3051f84df Web MQTT command_SUITE: cosmetics 2024-03-17 00:38:34 -04:00
Michael Klishin 5ddc16f8a6 Web MQTT command_SUITE: skip in mixed version mode 2024-03-16 23:45:49 -04:00
Michael Klishin e170bbf161 Fix //deps/rabbitmq_web_mqtt:command_SUITE (note: it's -mixed counterpart needs more work) 2024-03-16 18:27:20 -04:00
Michael Klishin 6fd8eba4fa Web MQTT: make //deps/rabbitmq_web_mqtt:xref build (and pass) 2024-03-16 18:07:25 -04:00
Michael Klishin d3ea70f83e Web MQTT: make //deps/rabbitmq_web_mqtt:dialyze build (and pass) 2024-03-16 18:06:00 -04:00
Michael Klishin f193ce1650 bazel run gazelle for #10693 2024-03-16 13:38:11 -04:00
Michael Klishin a2f98a8d5c Add new integration suite in #10693 to BUILD.bazel 2024-03-16 13:08:30 -04:00
LoisSotoLopez 481cac6430 Fix/9302 test list Web MQTT connections command
Discussion #9302
2024-03-16 13:08:30 -04:00
Lois Soto Lopez befb3b3015 Prevent not_found on list web mqtt connections
Fixes #9302
2024-03-16 13:08:30 -04:00
Michael Klishin 9c79ad8d55 More missed license header updates #9969 2024-02-05 12:26:25 -05:00
Michael Klishin f414c2d512
More missed license header updates #9969 2024-02-05 11:53:50 -05:00
Michael Klishin 01092ff31f
(c) year bumps 2024-01-01 22:02:20 -05:00
Michael Klishin 1b642353ca
Update (c) according to [1]
1. https://investors.broadcom.com/news-releases/news-release-details/broadcom-and-vmware-intend-close-transaction-november-22-2023
2023-11-21 23:18:22 -05:00
Péter Gömöri f3410db503 Web-MQTT: don't call FHC when connection terminates early
When the Web-MQTT connection terminates early because of no supported
subprotocol, `terminate/3` called fhc release although no fhc obtain was
called yet. This was the case even when `use_file_handle_cache` was false,
because `#state.should_use_fhc` was not initialized.

Fixing this avoids the below harmless warning

```
[debug] error updating ets counter <0.1224.0> in table #Ref<0.2797411137.1366163457.189876>:
[{ets, update_counter,
  [#Ref<0.2797411137.1366163457.189876>,
   <0.1224.0>, {5, -1}],
   ...
[warning] FHC: failed to update counter 'obtained_socket', client pid: <0.1224.0>
```
2023-10-06 07:22:01 +02:00
Michael Klishin 71a23c3675 Renaming in follow-up to #8790
{prefix}.enable_file_handle_cache => {prefix}.use_file_handle_cache
2023-07-10 13:35:25 +04:00
Michael Klishin 3339e8dea3 Web MQTT: release FHC handle only if FHC is enabled 2023-07-09 09:16:17 +04:00