Commit Graph

1421 Commits

Author SHA1 Message Date
Michael Klishin 7c47d0925a
Revert "Correct a double quote introduced in #4603"
This reverts commit 6a44e0e2ef.

That wiped a lot of files unintentionally
2022-04-20 16:05:56 +04:00
Michael Klishin 6a44e0e2ef
Correct a double quote introduced in #4603 2022-04-20 16:01:29 +04:00
Luke Bakken dba25f6462
Replace files with symlinks
This prevents duplicated and out-of-date instructions.
2022-04-15 06:04:29 -07:00
Philip Kuryloski 2dd9bde891 Bring over PROJECT_APP_EXTRA_KEYS values from make to bazel 2022-04-07 17:39:33 +02:00
Philip Kuryloski a22234f6eb Updates for rules_erlang 2.5.0
rabbitmq_cli uses some private rules_erlang apis that have changed in
the upcoming release

Additionally:
- Avoid including both standard and test versions of amqp_client in
integration test suites
- Eliminate most of the compilation order hints (explicit first_srcs)
in the bazel build
- Fix an include statement - in bazel, an app is not available to
itself as a library at compilation time
2022-04-07 14:54:37 +02:00
Michael Klishin 0ae3f19698
mqtt.queue_type => mqtt.durable_queue_type 2022-03-31 19:48:00 +04:00
Gabriele Santomaggio 2c49748c70
Add quorum queues support for MQTT
Enable the quorum queue for MQTT only if CleanSession is False.
QQs don't support auto-delete flag so in case Clean session is True
the queue will be a classic queue.

Add another group test non_parallel_tests_quorum.
For Mixed test the quorum_queue feature flag must be enabled.

Add log message
2022-03-30 08:49:17 -07:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Philip Kuryloski dabf053cf8 Additional dialyzer warning fixes
Currently loading of the rabbitmq_cli defined behaviors compiled with
Elixir does not work, so we ignore the callback definitions contained therein
2022-02-25 18:14:35 +01:00
Philip Kuryloski 226e00fcd2 Tighten up dialyzer usage
now that rules_erlang no longer cascades up dialyzer warnings from deps
2022-02-24 11:18:41 +01:00
Philip Kuryloski d8201726ae Ignore dialyzer warnings for most apps 2022-02-21 09:19:56 +01:00
Philip Kuryloski 2ec7ed8a41 Mark rabbitmq_mqtt:auth_SUITE as flaky 2022-02-02 16:06:35 +01:00
Philip Kuryloski efcd881658 Use rules_erlang v2
bazel-erlang has been renamed rules_erlang. v2 is a substantial
refactor that brings Windows support. While this alone isn't enough to
run all rabbitmq-server suites on windows, one can at least now start
the broker (bazel run broker) and run the tests that do not start a
background broker process
2022-01-18 13:43:46 +01:00
Michael Klishin f7d32d69f8 Introduce a new CLI tool (scope), rabbitmq-tanzu
For Tanzu (commercial) plugins to attach their commands to instead of
polluting rabbitmqctl.

Pair: @pjk25
(cherry picked from commit 6e0f2436fa)
2021-11-30 14:54:09 +00:00
Alexey Lebedeff e0723d5e66 Prevent crash logs when mqtt user is missing permissions
Fixes #2941

This adds proper exception handlers in the right places. And tests
ensure that it indeed provides nice neat logs without large
stacktraces for every amqp operation.

Unnecessary checking for subscribe permissions on topic was dropped,
as `queue.bind` does exactly the same check. Topic permissions tests
were also added, and they indeed confirm that there was no change in
behaviour.

Ideally the same explicit topic permission check should be dropped for
publishing, but it's more complicated - so for now there only a
detailed comment in the source code explaining it.

A few other things were also optimized away:
- Using amqp client to test for queue existence
- Creating queues/starting consumptions too eagerly, even if not yet
  requested by client
2021-11-12 18:03:05 +01:00
Michael Klishin 0f6a9dac27
Introduce rabbit_nodes:all/0 2021-09-20 22:24:25 +03:00
Philip Kuryloski 2b6296c4e2 Mark //deps/rabbitmq_mqtt:cluster_SUITE as flaky 2021-09-08 11:53:05 +02:00
Philip Kuryloski f95fc8aa0c Increase some suite timeouts in bazel 2021-07-23 09:43:05 +02:00
Michael Klishin 7de491fd82
Merge pull request #3187 from rabbitmq/less-chatty-mqtt
Change a log line from INFO to DEBUG
2021-07-12 19:07:29 +03:00
Philip Kuryloski 8f9de08de7 Also assert no missing suites for all other deps 2021-07-12 18:05:55 +02:00
Michal Kuratczyk 41922b96cf
Change a log line from INFO to DEBUG
This line is printed on every new MQTT connection which leads to very chatty logs when there is a lot of connections. Given that the way MQTT uses vhosts is generally static (once set up, always the same for all connections), I think this can be a debug message instead.
2021-07-12 16:50:25 +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
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 55b3b6a370 Mark //deps/rabbitmq_mqtt:java_SUITE as flaky in bazel 2021-06-21 11:16:45 +02:00
Philip Kuryloski 30f9a95b9f Add dialyze for remaning tier-1 plugins 2021-06-01 10:19:10 +02:00
Philip Kuryloski 98e71c45d8 Perform xref checks on many tier-1 plugins 2021-05-21 12:03:22 +02:00
Michael Klishin a755dca8e9
MQTT: use consistent Ra operation timeout values
of more than the default 5s which is really low.
2021-05-18 14:35:48 +03:00
Philip Kuryloski c13c2af614 Bazel file refactoring 2021-05-11 12:03:27 +02:00
Philip Kuryloski 36321ee126 Test rabbitmq_mqtt with bazel 2021-04-19 09:50:42 +02:00
Carl Hörberg 681cb78b0d Test that proxy dest address is picked up in all plugins 2021-03-31 11:28:40 +02:00
kjnilsson 62677cbacf
MQTT ra systems changes 2021-03-22 21:44:19 +03: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
Michael Klishin 5e0d7041cd
Merge pull request #2910 from rabbitmq/configure-num-conns-sup
Make ranch parameter `num_conns_sups` configurable
2021-03-19 21:59:30 +03:00
dcorbacho a41ece3950 Make ranch parameter `num_conns_sups` configurable
Defaults to 1
rabbit - num_conns_sup
rabbitmq_mqtt - num_conns_sup
rabbitmq_stomp - num_conns_sup
2021-03-18 21:38:13 +01:00
kjnilsson 52f745dcde Update rabbitmq-components.mk
use v1.x branch of ra
2021-03-18 15:14:40 +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 91964db0e6
MQTT: correct a typo in mqtt_machine
Introduced in #2861
2021-03-12 05:33:03 +03: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
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
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
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
Michael Klishin b11a79cccf
Bump (c) year in header files 2021-02-04 07:04:58 +03: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
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Arnaud Cogoluègnes b5315c0166
Merge branch 'master' into rabbitmq-stream-prometheus 2021-01-18 11:26:06 +01:00
Michael Klishin e8fccbaf48
MQTT auth_SUITE: synchronise concurrent setup with the test 2021-01-13 16:41:03 +03:00
Arnaud Cogoluègnes bf72683eb2
Add stream prometheus plugin 2021-01-11 16:49:56 +01:00
Arnaud Cogoluègnes cbd3c8dfdd
Merge branch 'master' into rabbitmq-stream-management 2021-01-04 09:50:47 +01:00
kjnilsson 04a55e0ee6 bug fixes 2020-12-22 15:16:17 +00:00
kjnilsson 160e41687d MQTT machine versions 2020-12-22 10:21:21 +00:00
kjnilsson 067a42e066 Optimise MQTT state machine
It was particularly slow when processing down commands.
2020-12-21 15:58:32 +00:00
Arnaud Cogoluègnes 224e9914b2
Merge branch 'master' into rabbitmq-stream-management 2020-12-04 10:26:42 +01:00
kjnilsson 6fdb7d29ec Handle errors in crashing_queues_SUITE
As the connection may crash during the previous declaration and a caught
error would be returned in amqp_connection:open_channel/1 that wasn't
handled previously. Exactly how things fail in this test is most likely
very timing dependent and may vary.

Also fixes mqtt test where the process that set up a mock auth ETS table
was transient when an rpc timeout was introduced
2020-12-03 13:56:09 +00:00
Arnaud Cogoluègnes 23d7e8114c
Introduce stream management plugin 2020-11-19 14:48:25 +01:00
Jean-Sébastien Pédron 47686ee1f0
Remove unused .github directories
They were valid until the switch to the "monorepository" when everything
was merged into a single Git repository.
2020-11-17 13:33:16 +01:00
Arnaud Cogoluègnes 07125203b9 Update rabbitmq-components.mk 2020-11-03 14:27:43 +01:00
Michael Klishin 89235cb9fc Update rabbitmq-components.mk 2020-10-21 12:55:39 +03:00
Michael Klishin 79a02256f1 Merge pull request #238 from rabbitmq/auth-attempt-metrics
Add auth attempt metrics
2020-10-14 23:56:29 +03:00
dcorbacho d80e8e1bec Add protocol to auth attempt metrics 2020-09-23 11:16:13 +01:00
Luke Bakken 1daae3064d Revert "Switch to classic OTP supervisor for two modules"
This reverts commit 1bead422a9.
2020-08-31 15:51:39 -07:00
Luke Bakken abb0ab5bd9 Revert "Closes #233"
This reverts commit c45b8d813a.
2020-08-31 15:50:32 -07:00
dcorbacho b138241b52 Add auth attempt metrics 2020-08-28 13:19:05 +01:00
Luke Bakken 65937d3b15 Update rabbitmq-components.mk 2020-08-04 08:41:48 -07:00
Jean-Sébastien Pédron 7d7c8e11d2 Update rabbitmq-components.mk 2020-07-30 12:06:54 +02:00
Luke Bakken f92e4b24ca Update rabbitmq-components.mk 2020-07-29 10:02:04 -07:00
dcorbacho 40e2e3fb13 Update erlang.mk 2020-07-21 14:33:00 +01:00
Michael Klishin 3cc3974f82 Update rabbitmq-components.mk 2020-07-21 13:12:50 +03:00
Michael Klishin 05d99be34e Update rabbitmq-components.mk 2020-07-21 03:43:02 +03:00
dcorbacho 99bf86bb87 Revert drop of Exhibit B on MPL 2.0 2020-07-20 17:01:38 +01:00
dcorbacho e92f7999a2 Update LICENSE 2020-07-20 11:43:03 +01:00
Michael Klishin 4b33266425 Update MPL2 license file, drop Exhibit B
and add a VMware copyright notice.

We did not mean to make this code Incompatible with Secondary Licenses
as defined in [1].

1. https://www.mozilla.org/en-US/MPL/2.0/FAQ/
2020-07-17 14:53:09 +03:00
dcorbacho dae65d8e8d Merge branch 'master' into rabbitmq-server-2321 2020-07-14 15:48:30 +01:00
D Corbacho 1a9632576d Merge pull request #236 from rabbitmq/switch-to-MPL-2.0
Switch to Mozilla Public License 2.0 (MPL 2.0)
2020-07-13 17:40:24 +01:00
dcorbacho 119eb99e8d Switch to Mozilla Public License 2.0 (MPL 2.0) 2020-07-13 17:39:36 +01:00
Michael Klishin 30e6cbdd24 Extract rabbit_networking:stop_ranch_listener_of_protocol/1
Part of rabbitmq/rabbitmq-server#2321
2020-07-09 22:02:09 +03:00
kjnilsson 3cf84a19b2 Fix mqtt_machine crash bug
When a client performs repeated requests the state machine would crash
with a match exception.

Add unit test suite for mqtt_machine.
2020-07-09 14:41:00 +01:00
Michael Klishin d7474cee33 Cosmetics 2020-07-08 20:00:00 +03:00
Michael Klishin 13cbcfff79 Cosmetics 2020-07-08 19:21:21 +03:00
Michael Klishin 033128cb35 Make sure MQTT plugin closes its connections when a node is put into maintenance mode
Part of rabbitmq/rabbitmq-server#2321
2020-07-08 19:10:54 +03:00
Michael Klishin 73ed4d3772 Unify Ranch ref construction for all listeners
This makes the refs predictable and easy to compute
from a listener record. Then suspending all listeners
becomes a lot simpler.

While at it, make protocol applications clean up
their listeners when they stop. This way tests
and other callers that have to stop the app
would not need to know anything about
its listeners.

Part of rabbitmq/rabbitmq-server#2321
2020-06-24 04:27:34 +03:00
Jean-Sébastien Pédron 378b6719e4 Update erlang.mk 2020-06-23 17:14:34 +02:00
Michael Klishin c45b8d813a Closes #233 2020-06-18 03:32:35 +03:00
Michael Klishin 1bead422a9 Switch to classic OTP supervisor for two modules
supervisor2 features are not needed there, so why not use
the standard thing that's evolving together with Erlang/OTP.

Part of #233.
2020-06-18 03:04:13 +03:00
Michael Klishin 6280926bb2 Bump Recon to 2.5.1
for Erlang 23 compatibility of 'rabbitmq-diagnostics observer'

References zhongwencool/observer_cli#68.
2020-06-09 08:22:16 +03:00
Michael Klishin ae37b4723a Use a higher Ra operation timeout 2020-06-02 21:37:14 +03:00
Jean-Sébastien Pédron dcc5f7b553 Update copyright (year 2020) 2020-03-10 16:39:48 +01:00
Gerhard Lazu 30d4f0a4e5 Update rabbitmq-components.mk 2020-03-06 09:19:17 +00:00
Gerhard Lazu 64db4888d1 Update erlang.mk 2020-03-06 09:18:01 +00:00
Jean-Sébastien Pédron f48167a514 Travis CI: Update config from rabbitmq-common 2020-03-04 14:24:30 +01:00
Jean-Sébastien Pédron 3f09bfb1f3 Travis CI: Update config from rabbitmq-common 2020-03-04 11:17:16 +01:00
Jean-Sébastien Pédron 9e8def2ed5 Travis CI: Update config from rabbitmq-common 2020-03-03 14:53:39 +01:00
Jean-Sébastien Pédron 2b62f489dc Travis CI: Refresh config patch 2020-03-03 14:30:05 +01:00
Michael Klishin 8b638f413a Avoid using erlang:get_stacktrace/0 for improved OTP 23/24 compat
(cherry picked from commit 251a40f705)
2020-02-27 22:34:56 +03:00
Michael Klishin ed5c1c954a Randomized Raft node startup delay
Same fundamental idea as Raft itself uses to avoid
cluster fragmentation on parallel node boot.

(cherry picked from commit f8a9b4b8b6)
2020-02-26 02:23:33 +03:00
Michael Klishin bbc170af7b Synchronise plugin start with that of Raft node
While at it, start listeners after the client ID
tracker is ready. Otherwise we run the risk of taking
client connections in before they can be accepted.

(cherry picked from commit 5da74b6e82)
2020-02-26 02:23:26 +03:00
Michael Klishin e6a8d93bb5 Inject a delay before joining client ID tracking cluster
We have considered multiple options in preventing a split cluster
scenario when N nodes a started in parallel and are initially unaware of
each other. They all are fairly involved and run various risks, e.g.
of losing consistency for cluster members that need to rejoin a newly
discovered set of members.

A simple delay to see if there may be any peers seems to be a straightfoward
solution that would make a practical difference.

In the future consistent client ID tracking should be a feature the user
can opt out of because it tilts MQTT plugin potentially to far towards
C on the consistency/availability range.

Pair: @kjnilsson
2020-02-24 17:58:03 +03:00
Michael Klishin 377752d003 Ignore client ID tracker timeouts on connection closure
There isn't much to do about those at this stage in the connection
lifecycle anyway.
2020-02-21 21:42:39 +03:00
Gerhard Lazu 72887dbd52 Update rabbitmq-components.mk 2020-02-11 15:31:46 +00:00
kjnilsson eadf5f7094 Make interactions with Ra async
To avoid blocking when registering or unregistering a client id. This is
ok as informing the current connection holder of the client id is
already async. This should be more scalable and provide much better MQTT
connection setup latency.
2020-02-10 17:28:18 +00:00
Michael Klishin 2927f473ce (c) bump 2019-12-29 05:50:32 +03:00
Jean-Sébastien Pédron 3af67f744b Git: Ignore copied CLI 2019-12-12 15:00:20 +01:00
Jean-Sébastien Pédron a188885008 Update rabbitmq-components.mk 2019-12-12 13:14:55 +01:00
Michael Klishin cf9e258d49 Make it possible to override client ID in some tests 2019-11-25 17:37:50 +03:00
Michael Klishin ddb00edbeb Merge pull request #217 from velimir/cache-topic-access
cache topic access
2019-11-07 22:51:17 +00:00
Grigory Starinkin a337839983 limit topic permission cache size 2019-11-07 14:40:10 +00:00
Grigory Starinkin 8c29181b7b cache topic permission access
performance optimisation
2019-11-07 14:39:43 +00:00
Grigory Starinkin 549579e595 cache topic translation results
performance optimisation
2019-11-07 14:36:14 +00:00
Michael Klishin 92edaa716e Update .travis.yml 2019-11-05 17:24:16 +00:00
Michael Klishin 5947ac6961 Use a topic name that has R and W permissions 2019-11-05 17:07:55 +00:00
Michael Klishin 35a99a24a2 Downgrade QoS 2 to QoS 1 when sending Last Will
Closes #214.
2019-11-05 16:54:20 +00:00
Jean-Sébastien Pédron 26995315c6 rabbit_mqtt_collector: Pass several node IDs to ra:query_leader()
... instead of the local node ID only.

In CI, after an MQTT node is decommissioned (using `rabbitmqctl
decommission_mqtt_node`), `ra:query_leader()` with the local node ID
may return `{error, noproc}`.

Giving this function all the node IDs fixes the problem because Ra tries
all node IDs in turn until one responds.
2019-10-29 10:18:03 +01:00
Michael Klishin ab1b923794 (c) year 2019-10-22 13:31:13 +03:00
Arnaud Cogoluègnes 26a17e8530 Modernize Java test suite
Migrate to JUnit 5, use TestInfo to create test-related MQTT
client ID when possible, remove Awaitility in favor of a in-house
utility and the use of lambdas, clean some code.
2019-09-23 14:43:40 +02:00
Luke Bakken e8c9b6d118 Remove two unnecessary class variables 2019-09-20 15:51:39 -07:00
Luke Bakken a07c231891 Ensure each test has a meaningful client id 2019-09-20 15:44:28 -07:00
Luke Bakken 2141339a80 Remove another snowflake topic 2019-09-20 09:16:04 -07:00
Luke Bakken 13f881e6e3 Remove another snowflake topic 2019-09-20 05:22:16 -07:00
Luke Bakken e19deefc14 Remove "mid" topic and replace with test-topic 2019-09-20 05:01:29 -07:00
Luke Bakken 60ac7affa5 Use per-testcase instance of TestMqttConnectOptions 2019-09-19 17:12:55 -07:00
Luke Bakken 54a3ab1666 Formatting 2019-09-19 16:37:05 -07:00
Luke Bakken a487dc427a Fix willIsRetained test 2019-09-19 11:39:48 -07:00
Luke Bakken d92c60e882 Fixed the lastWillNotSentOnRestrictedTopic test 2019-09-19 11:17:13 -07:00
Luke Bakken d8669f7bc0 Increase debug level
One test fixed at least
2019-09-19 10:00:43 -07:00
Michael Klishin b94ceeb398 Java integration suite: reduce use of shared mutable state
Per discussion with @acogoluegnes.
2019-09-19 15:26:21 +03:00
Michael Klishin 4755325f19 An attempt to avoid Paho Java state exceptions 2019-09-19 11:39:58 +03:00
Michael Klishin 286e60b08f Ignore IDEA project files 2019-09-19 10:30:20 +03:00
Michael Klishin 82f526baed New Paho version does not handle null passwords 2019-09-19 10:28:39 +03:00
Michael Klishin 103dc2c5eb Bump RabbitMQ and Paho clients used in tests 2019-09-19 09:26:26 +03:00
kjnilsson 1cb43f9a7d Update rabbitmq-components.mk 2019-09-13 10:24:25 +01:00
Luke Bakken 92f1ca1971 Rename sparkplug_b to sparkplug 2019-09-06 08:58:04 -07:00
Arnaud Cogoluègnes 2ffa74e262 Disable Sparkplug support by default
References #206
2019-09-06 15:08:57 +02:00
Arnaud Cogoluègnes f0ef67e2fc Use AMQP topic name in translation test
References #206
2019-09-06 15:07:29 +02:00
Luke Bakken 061651f31e Correctly set topic permissions for sparkplug B prefix, and use correct topics in test 2019-09-04 10:24:47 -07:00
Luke Bakken d0c0ec33ff Use new translation funs in library 2019-09-04 08:07:33 -07:00
Luke Bakken e7554def0a Topic translation CT tests pass 2019-09-04 07:43:35 -07:00
Luke Bakken 8e1ddac03d Add CT tests for topic translation funs, failing currently 2019-09-04 07:43:35 -07:00
Luke Bakken e05d0e2dbd Use string: functions rather than regexes 2019-09-04 07:43:35 -07:00
Luke Bakken b60582d0fb Start working on MQTT/AMQP translation funs that take sparkplug into account 2019-09-04 07:43:35 -07:00
Luke Bakken 04fcd898ca Add failing test involving MQTT/Sparkplug B and AMQP interop 2019-09-04 07:43:35 -07:00
Luke Bakken 88bf29e7b3 Fix test for mqtt.sparkplug_b 2019-09-04 07:43:35 -07:00
Luke Bakken e0504e7617 Add failing test for mqtt.sparkplug_b schema element 2019-09-04 07:43:35 -07:00
kjnilsson 52dbc4206c Update rabbitmq-components.mk 2019-09-04 10:31:03 +01:00
Michael Klishin d821e1cacb Merge pull request #204 from rabbitmq/vhost-description
Use `rabbit_vhost:list_names/0'
2019-08-30 13:09:18 +03:00
kjnilsson 41d53deaf1 remove unused header 2019-08-30 10:47:08 +01:00
Diana Corbacho 206f28ba65 Use `rabbit_vhost:list_names/0'
[#166298298]
2019-08-30 11:00:53 +02:00
Jean-Sébastien Pédron 158eb42c93 Update erlang.mk 2019-08-29 20:45:31 +02:00
Jean-Sébastien Pédron 2f35106928 Makefile: Don't set `$(ELIXIR_LIB_DIR)` here
It is already managed by `rabbitmq-build.mk`.
2019-08-14 11:19:21 +02:00
Michael Klishin dd259d0455 Update rabbitmq-components.mk 2019-08-11 01:48:00 +10:00
Jean-Sébastien Pédron 90642c0fe9 Update erlang.mk 2019-08-02 09:54:18 +02:00
Michael Klishin deb78e9c06 Update rabbitmq-components.mk 2019-08-01 17:13:21 +03:00
Arnaud Cogoluègnes c403200bad Do not reach out to all nodes when listing connections
The way connections are listed already contains all the connections, so
there is no need to reach out to all cluster nodes and aggregate the
results, as it results in duplicate lines.

The command test now uses a cluster to make sure connections are listed
properly in a cluster.

[#167639960]

Fixes #202
2019-08-01 09:29:16 +02:00
Michael Klishin 6bdc227900 Squash a couple of warnings 2019-07-31 07:47:44 +03:00
Michael Klishin 7081ecb918 Avoid performing a Ra operation on an empty list of nodes
That fails with a function clause.
2019-07-30 20:35:44 +03:00
Michael Klishin abe5abf48c Use a tick timeout value connected to node's nettick
Quorum queues do that and it makes more sense than a hardcoded,
subsystem-specific value.
2019-07-30 05:51:25 +03:00
Michael Klishin cacd557740 Log connection errors as such 2019-07-29 17:27:27 +03:00
Michael Klishin 5c7fe2cc7b Use more diverse return values from process_request for CONNECT
A drive-by change discovered with @kjnilsson while pairing
on #200.
2019-07-29 16:59:19 +03:00
Michael Klishin baf51aa146 This list is a list of compatible peers
It cannot contain our own node, so the match
fails and a new leader election is never started,
so client ID tracking cluster does not start.
2019-07-29 15:09:45 +03:00
Michael Klishin 2192861ffe Return an empty list of client IDs if Raft cluster query times out 2019-07-26 22:31:06 +03:00
Michael Klishin 091127a422 Make sure client ID tracker can rejoin the cluster
Previously it could time out waiting for a peer to
become available in certain node shutdown/restart
scenarios.

Pair: @kjnilsson.

Closes #200.
2019-07-26 20:20:24 +03:00
Arnaud Cogoluègnes 1938920fad Update rabbitmq-components.mk 2019-07-09 16:06:03 +02:00
Michael Klishin 7d8d7c491c Return false here as this module does not provide an update_state/2 2019-07-02 16:27:10 +02:00
Arnaud Cogoluègnes 689a557c4c Add state_can_expire/0 to mock authn/authz backend
References rabbitmq/rabbitmq-auth-backend-oauth2#28
2019-07-02 15:50:12 +02:00
Jean-Sébastien Pédron f3647910b1 Update rabbitmq-components.mk 2019-06-28 16:05:35 +02:00
Jean-Sébastien Pédron 38265434d5 Update erlang.mk 2019-06-28 16:02:24 +02:00
Jean-Sébastien Pédron 437bb5da96 Java testsuite: Use a third RabbitMQ node for the cluster-wide client ID tracking test
This is to ensure that the test can pass in a mixed-versions cluster
where odd-numbered nodes might not support clsuter-wide client ID
tracking (RabbitMQ 3.7.x).
2019-06-12 16:29:38 +02:00
Jean-Sébastien Pédron cf082aa6fd test/java_SUITE_data/pom.xml: Make it compatible with Java 12 2019-06-12 16:29:06 +02:00
Jean-Sébastien Pédron 3c111a18be mqtt_node: Skip incompatible nodes when configuring Ra cluster
In the cluster_SUITE testsuite:

All even-numbered nodes will use the same code base when using a
secondary Umbrella. Odd-numbered nodes might use an incompatible code
base. When cluster-wide client ID tracking was introduced, it was not
put behind a feature flag because there was no need for one. Here, we
don't have a way to ensure that all nodes participate in client ID
tracking. However, those using the same code should. That's why we
limit our RPC calls to those nodes.

That's also the reason why we use a 5-node cluster: with node 2 and
4 which might not participate, it leaves nodes 1, 3 and 5: thus 3
nodes, the minimum to use Ra in proper conditions.

References #91, #195.
[#135330629]
2019-06-11 18:26:27 +02:00
Jean-Sébastien Pédron 391c44c665 rabbit_auth_backend_mqtt_mock: Move this test module to `test/` 2019-06-11 16:15:10 +02:00
Jean-Sébastien Pédron 8de6ab7e81 cluster_SUITE: Bump suite timestrap to 5 minutes
One minute seems too short for those tests in CI.
2019-06-11 13:52:05 +02:00
Michael Klishin e900354db5 Merge pull request #195 from rabbitmq/rabbitmq-mqtt-91
Cluster-wide MQTT client id tracking
2019-06-11 01:32:20 +03:00
Michael Klishin 91d3d72bf8 Refactor 2019-06-11 01:31:44 +03:00
Michael Klishin 91a6252cff More tests 2019-06-11 01:26:07 +03:00
Arnaud Cogoluègnes 85e2755c9a Add mock auth backend
References rabbitmq/rabbitmq-server#1767
2019-06-06 13:16:14 +02:00
Arnaud Cogoluègnes 7f8708bd85 Add test to check client id propagation
This commit adds a test to check the MQTT client is properly propagated
to the authentication and authorization backends.

References rabbitmq/rabbitmq-server#1767
2019-06-06 10:46:31 +02:00
Michael Klishin 5e81c4ea83 Compile 2019-06-04 19:13:12 +03:00
Michael Klishin 5725a21015 Remonitor connections on short disconnects and after recovery 2019-06-04 17:19:32 +03:00
Michael Klishin 2107daf93f Remove a clause that's no longer used 2019-06-04 16:34:22 +03:00
Michael Klishin 129d92b431 Do not snapshot when a new client is registered 2019-06-04 16:33:48 +03:00
Michael Klishin bfa7f332c0 Only emit snapshot effects when client ID map changes 2019-06-04 13:54:34 +03:00
Michael Klishin 1434eb991b Switch rabbit_mqtt_collector:list/0 to use a leader query
While at it, improve error handling around client ID
collector unavailability.
2019-06-04 13:40:26 +03:00
Michael Klishin f4f65867ea Client tracking: notify existing connections in a one-off process
To avoid blocking the leader even a little bit.
Per suggestion from @kjnilsson.
2019-06-04 12:25:09 +03:00
Michael Klishin c5ccd7b4ac A typo 2019-06-04 03:24:20 +03:00
Michael Klishin e220b896d2 decommission_mqtt_node only belongs to the ctl scope 2019-06-04 03:15:42 +03:00
Michael Klishin f0d9bf8d8e decomission_mqtt_node: wording 2019-06-04 02:11:37 +03:00
Michael Klishin 4130c2cc8c Consistency 2019-06-04 02:11:06 +03:00
Michael Klishin d86390453a Correct a typo 2019-06-04 02:00:36 +03:00
Michael Klishin 16850a954f Client ID tracking: make more transitions leader node-only 2019-06-04 01:57:27 +03:00
Michael Klishin 769089b6d8 Wording 2019-06-04 01:56:56 +03:00
Michael Klishin 9c07491ddc Define a state_enter/2 fun to clean up on disk state
A freshly started node by definition wouldn't have any
connections. This is a Ra-idiomatic way of cleaniing up
on disk state that involves pids.

Per recommendation from @kjnilsson.
2019-06-04 00:45:53 +03:00
Michael Klishin 2613595b5e Use a function call effect
so that this state transition applied on the leader node only.
2019-06-04 00:44:45 +03:00
Michael Klishin e004f0bb91 Do not unregister a client ID if it does not belong to the terminating connection
Due to the LWW [A] semantics of duplicate client ID handling there might
be another process register with the client ID by the time a client
is disconnected and has to be unregistered. Consider the following
scenario:

1. Client A connects, client ID map is updated and now contains
   a new entry with A's pid
2. Client B connects, client ID map is updated and now contains
   an updated entry with B's pid
3. B disconnects, `rabbit_mqtt_collector:unregister/2` deletes
   the entry in the client IDs map
4. The map is empty, even though one client still has to be connected
5. Client A reconnects and duplicate client ID is
   not detected by `rabbit_mqtt_collector:register/2`

A. Last Write Wins
2019-06-03 16:05:14 +03:00
Michael Klishin 4215d2e7a5 Logging: mention client ID when accepting a connection 2019-06-03 15:24:35 +03:00
Diana Corbacho 9e1d1f577a Add forgotten files
[#135330629]
2019-06-03 10:24:12 +02:00
Michael Klishin 288d9dc7ee Merge branch 'master' into rabbitmq-mqtt-91 2019-06-03 09:58:15 +03:00
Gerhard Lazu 25c111a726 Update rabbitmq-components.mk 2019-06-03 02:23:41 +01:00
Jean-Sébastien Pédron d9cc2a6623 Update rabbitmq-components.mk 2019-05-17 15:17:22 +02:00
Michael Klishin 521093e588 Update rabbitmq-components.mk 2019-05-17 08:36:54 +03:00
Diana Corbacho 32200bb352 Change banner
[#135330629]
2019-05-16 20:47:55 +01:00
Diana Corbacho 7bfe632cb6 Cluster-wide MQTT client id tracking
Uses a ra cluster to keep the client id tracking information - in
the state of the ra machine.

If nodes are decommissioned from the RMQ cluster, the command
decommission_mqtt_node must be invoked first to disconnect the clients
on that node and remove the node from the ra cluster.

[#135330629]
2019-05-16 17:50:06 +01:00
Michael Klishin 2e35f9b7c2 Update rabbitmq-components.mk 2019-05-14 11:50:54 +03:00
Michael Klishin 307411067e Update rabbitmq-components.mk 2019-05-13 16:40:38 +03:00
Gerhard Lazu 3e17e1a80d Update rabbitmq-components.mk 2019-05-01 13:18:18 +01:00
Luke Bakken 1596ef9ae5 Update rabbitmq-components.mk 2019-04-30 16:21:00 -07:00
Jean-Sébastien Pédron 5050e66b63 Update rabbitmq-components.mk 2019-04-30 14:47:34 +02:00
Gerhard Lazu 2e4451a8ef Update rabbitmq-components.mk 2019-04-22 21:55:09 +01:00
Michael Klishin 71563a65d8 CLI tool: wording 2019-03-26 20:32:40 +03:00
Michael Klishin 8ab9f8ff6d CLI commands: provide more information to the new help command 2019-03-26 20:29:56 +03:00
Spring Operator 96006cd58b URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 1 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-21 03:17:58 -05:00
Spring Operator 852c61ea99 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rabbitmq.com/mpl.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/mpl.html ([https](https://www.rabbitmq.com/mpl.html) result 200).
* http://www.rabbitmq.com/mqtt.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/mqtt.html ([https](https://www.rabbitmq.com/mqtt.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 27 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html ([https](https://www.rabbitmq.com/man/rabbitmq-plugins.1.man.html) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:18:59 -05:00
Michael Klishin 847e27b83f Travis: use Erlang 21.3, Elixir 1.8.1 2019-03-20 10:33:17 +03:00
Spring Operator c90ca44234 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://maven.apache.org/xsd/maven-4.0.0.xsd with 1 occurrences migrated to:
  https://maven.apache.org/xsd/maven-4.0.0.xsd ([https](https://maven.apache.org/xsd/maven-4.0.0.xsd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0 with 2 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 1 occurrences
2019-03-19 20:10:10 -05:00
Michael Klishin fe51f5d4e5 Additional help content for CLI command 2019-03-19 20:34:58 +03:00
Daniil Fedotov e7fd8ce1b4 Handle 21.3 tls_alert error format. 2019-03-18 18:33:52 -04:00
Michael Klishin 2b3b697db3 Update rabbitmq-components.mk 2019-03-15 09:34:42 +03:00
Michael Klishin ec18c091c2 Update rabbitmq-components.mk 2019-03-15 05:05:51 +03:00
Spring Operator 7e218211b8 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://www.apache.org/licenses/LICENSE-2.0 migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* http://www.rabbitmq.com migrated to:
  https://www.rabbitmq.com ([https](https://www.rabbitmq.com) result 200).

# Ignored
These URLs were intentionally ignored.

* http://maven.apache.org/POM/4.0.0
* http://maven.apache.org/xsd/maven-4.0.0.xsd
* http://www.w3.org/2001/XMLSchema-instance
2019-03-11 21:54:05 -05:00
Michael Klishin 358c8c97cc Wording 2019-02-21 20:29:14 +03:00
Daniil Fedotov afa6729b1d Description for help command.
Requires https://github.com/rabbitmq/rabbitmq-cli/pull/316
2019-02-20 14:24:30 -05:00
Michael Klishin bcb25da3ce Update rabbitmq-components.mk 2019-02-12 23:24:00 +03:00
Michael Klishin 0d747b18df Wording 2019-02-08 01:58:27 +03:00
Luke Bakken 2f205cc21a Handle duplicate CONNECT frame
Fixes #179

Uses undefined MQTT return code 255 to mean "duplicate auth attempt"

Treat duplicate CONNECT / login like a real connect
2019-02-07 12:49:24 -08:00
Michael Klishin 530cf87095 Handle socket write failures and log them
...instead of letting connection proceesses terminate and
the runtime to log scary looking crash reports.

STOMP has been doing this without logging for a while:

 * https://github.com/rabbitmq/rabbitmq-stomp/blame/v3.7.x/src/rabbit_stomp_reader.erl#L344
 * https://github.com/rabbitmq/rabbitmq-stomp/blob/v3.7.x/src/rabbit_stomp_processor.erl#L1167

Note that otherwise connection error handling is not affected
by this change.

While at it, added more debug logging.

Per discussion with @lukebakken.

References rabbitmq/rabbitmq-server#1862.
2019-02-05 02:49:36 +03:00
Michael Klishin 48bac2500a Formatting 2019-02-03 20:09:41 +03:00
Michael Klishin 9caf40afa1 Cosmetics 2019-02-03 19:43:44 +03:00
Ryan Sandbach 08f97b9e6f New tests for retainer translation. 2019-02-01 00:21:10 -05:00
Ryan Sandbach 563e6529c0 Use translation for retained messages. 2019-02-01 00:20:27 -05:00
Arnaud Cogoluègnes ec65574e1f Add client ID to connection metadata
[#153246723]

Fixes #152
2019-01-22 10:30:25 +01:00
Michael Klishin 1039a21349 .travis.yml: use 21.2 as 21.2.2 builds are no available 2019-01-14 01:20:23 +03:00
Michael Klishin 75d2b49303 .travis.yml: sync Erlang and Elixir versions, require Erlang/OTP 21.2 2019-01-13 05:50:02 +03:00
Luke Bakken 5293a3093e Update rabbitmq-components.mk 2019-01-09 12:55:12 -08:00
Luke Bakken 198d62a64f Update rabbitmq-components.mk 2019-01-08 11:58:31 -08:00
Michael Klishin 16d262f908 Additional tests extracted from rabbitmq/rabbitmq-stomp#130
The settings are already supported by this plugin.
2019-01-02 20:36:51 +03:00
Michael Klishin e25aaba832 Revert "Revert "Use {active,once} instead of async_recv""
This reverts commit e064ace943.

The change to {active, once} ended up being unrelated; it's a bug
in the Erlang 21.2 ssl app.
2018-12-22 10:09:32 +03:00
Michael Klishin e064ace943 Revert "Use {active,once} instead of async_recv"
This reverts commit 70ca23a505.

Due to obscure CI failures in rabbitmq-[web-]stomp.
2018-12-21 21:27:25 +03:00
Loïc Hoguin 70ca23a505 Use {active,once} instead of async_recv 2018-12-18 12:51:14 +01:00
Loïc Hoguin 160e2fb12c Remove a duplicate control_throttle
The function is already called before calling
process_received_bytes, there doesn't seem to
be a reason to call it again.
2018-12-11 15:00:03 +01:00
Michael Klishin 7269ef09d5 Update rabbitmq-components.mk 2018-12-06 18:28:55 +03:00
Loïc Hoguin 7e09b85426 Allow giving the peer address directly for initial_state
Changes initial_state/4 to initial_state/5 to add the peer
address that needs to be provided by Web MQTT. This function
was only used locally and by Web MQTT.
2018-12-04 14:50:32 +01:00
Loïc Hoguin e26c15f047 Use the built-in Ranch PROXY protocol support 2018-12-04 13:15:33 +01:00
Jean-Sébastien Pédron 024b8fc32c Update rabbitmq-components.mk 2018-11-30 14:56:53 +01:00
Jean-Sébastien Pédron b6c2461b11 Update rabbitmq-components.mk 2018-11-22 09:19:38 +01:00
Arnaud Cogoluègnes f1c1dbf30d Use Maven wrapper for Java test suite
This avoids depending on a local Maven.
2018-11-06 11:46:12 +01:00
Arnaud Cogoluègnes 9043d97f60 Fix Maven tests for CI environment
OpenJDK 1.8.0_181 on Debian-based distros introduces a bug that breaks
the Maven Surefire plugin (test plugin). This commit adds an argument to
the plugin configuration to fix this problem. It also bumps some Java
dependencies.
2018-11-06 11:31:18 +01:00
kjnilsson 9a4de20eb1 Update rabbitmq-components.mk 2018-10-29 12:43:25 +00:00
Luke Bakken 2824fdbf1e comment 2018-10-11 07:07:23 -07:00
Michael Klishin 50dfaaa237 Use 10 TLS connection acceptors by default
Part of rabbitmq/rabbitmq-server#1729.

[#161136615]
2018-10-11 03:00:39 +03:00
Jean-Sébastien Pédron a1d729b56a Update rabbitmq-components.mk 2018-09-19 10:38:19 +02:00
Jean-Sébastien Pédron 626a9ab5d1 Update rabbitmq-components.mk 2018-09-11 14:22:34 +02:00
Luke Bakken fcce77c670 Update git-commit-msgs link 2018-08-28 16:19:03 -07:00
Diana Corbacho 4d4f490bc3 Session flag must be calculated before declaring the queue
[#159921198]
2018-08-21 12:05:29 +01:00
Jean-Sébastien Pédron dbb0713f0b Update rabbitmq-components.mk 2018-08-09 17:44:18 +02:00
Jean-Sébastien Pédron f82324006c Update rabbitmq-components.mk 2018-08-09 12:17:04 +02:00
Michael Klishin a0ff2181a1 Don't await a logger process that won't ever be started on OTP 21
Same change as in a210d82f54.

References rabbitmq/rabbitmq-server#1616.

[#157964874]
2018-07-11 22:10:41 +03:00
Jean-Sébastien Pédron 2cb96acdfc Makefile: Use our emqttc fork, at least temporarily
gen_logger, a dependency of emqttc, requires large changes to work with
Erlang 21. Its use in emqttc would need to change as well.

As we are only using this client for testing purpose, it's easier for
now to remove logging completely to gain Erlang 21 compatibility.

[#157964874]
2018-06-07 11:45:02 +02:00
Michael Klishin 12cb0886d8 Compile Erlang/OTP 21
OTP 21 deprecated erlang:get_stacktrace/0 in favor of a new
try/catch syntax. Unfortunately that's not realistic for projects
that support multiple Erlang versions (like us) until OTP 21 can be
the minimum version requirement. In order to compile we have to ignore
the warning. The broad compiler option seems to be the most common
way to support compilation on multiple OTP versions with warnings_as_errors.

[#157964874]
2018-06-07 11:45:02 +02:00
Jean-Sébastien Pédron b770e48268 Update rabbitmq-components.mk 2018-06-07 11:31:39 +02:00
Jean-Sébastien Pédron 06ed90911e Update erlang.mk 2018-04-11 10:53:42 +02:00
Jean-Sébastien Pédron 23d5b49b6a Update rabbitmq-components.mk 2018-04-11 10:51:25 +02:00
Jean-Sébastien Pédron 51c0177da0 Update rabbitmq-components.mk 2018-04-11 10:10:07 +02:00
Jean-Sébastien Pédron dc7734ca9c Travis CI: Update config from rabbitmq-common 2018-04-10 13:08:25 +02:00
Jean-Sébastien Pédron 24da2b307a Makefile: Do not hard-code the supposed name of GNU Make's executable
There is the `$(MAKE)` variable populated with the current/appropriate
Make executable.
2018-04-05 10:30:46 +02:00
Jean-Sébastien Pédron 1111210ce8 Update erlang.mk 2018-03-02 19:07:39 +01:00
Jean-Sébastien Pédron ef9c188caf Update rabbitmq-components.mk 2018-01-30 15:23:47 +01:00
Luke Bakken 2f26b97e1d Update rabbitmq-components.mk 2018-01-29 16:22:18 -08:00
Jean-Sébastien Pédron 7dd2760858 Update rabbitmq-components.mk 2018-01-23 17:21:37 +01:00
Jean-Sébastien Pédron 4493123923 Update rabbitmq-components.mk 2018-01-23 15:31:25 +01:00
Diana Corbacho baf70acb32 Update rabbitmq-components.mk 2018-01-22 22:13:26 +00:00
Jean-Sébastien Pédron 8c77612a94 Merge branch 'rabbitmq-management-528' 2018-01-03 10:51:14 +01:00
Michael Klishin 729d778d88 Ignore debug/* 2018-01-03 03:30:01 +08:00
Michael Klishin 1c3c2af838 Support maps as well as proplists when fetching global runtime params
Part of rabbitmq/rabbitmq-management#528.
2018-01-03 03:29:24 +08:00
Jean-Sébastien Pédron d100c7f402 Travis CI: Update config from rabbitmq-common 2017-12-15 15:13:35 +01:00
Jean-Sébastien Pédron 8997e867bd Travis CI: Update config from rabbitmq-common 2017-12-15 14:54:57 +01:00
Jean-Sébastien Pédron b514c30401 Merge branch 'read-cert-name-from-cert-part2' into v3.7.x 2017-12-15 12:12:43 +01:00
Jean-Sébastien Pédron 665abcdf2c Merge branch 'read-cert-name-from-cert-part2' 2017-12-15 12:06:13 +01:00
Jean-Sébastien Pédron be27eea7ac java_SUITE_data: Ignore target/ 2017-12-15 12:05:24 +01:00
Jean-Sébastien Pédron 2993a1426b java_SUITE: Get certificate name from the certificate itself
... instead of hard-coding the value. This fixes the testsuite when the
generated certificate configuration changes.

The same change was made to auth_SUITE in commit a11e96caa0.

[#153697697]
2017-12-15 12:02:36 +01:00
Jean-Sébastien Pédron b316731694 Merge branch 'read-cert-name-from-cert' into v3.7.x 2017-12-15 11:42:08 +01:00
Jean-Sébastien Pédron ac32092fc2 Merge branch 'read-cert-name-from-cert' 2017-12-15 11:27:29 +01:00
Jean-Sébastien Pédron a11e96caa0 auth_SUITE: Get certificate name from the certificate itself
... instead of hard-coding the value. This fixes the testsuite when the
generated certificate configuration changes.

[#153697697]
2017-12-15 11:22:01 +01:00
Jean-Sébastien Pédron 6372727eb5 Travis CI: Update config from rabbitmq-common 2017-12-14 17:03:02 +01:00
Jean-Sébastien Pédron a353aa39df Update rabbitmq-components.mk 2017-12-14 14:38:51 +01:00
Luke Bakken 4e798ff793 Fix tests broken by rabbitmq/rabbitmq_ct_helpers#17
(cherry picked from commit 40bb49c6537faa6a45535916ee0fa69f9f0d4f14)
2017-12-08 07:02:24 -08:00
Luke Bakken 60dfb72800 Fix tests broken by rabbitmq/rabbitmq_ct_helpers#17 2017-12-07 15:36:14 -08:00
Jean-Sébastien Pédron 25b9a16cc6 Update rabbitmq-components.mk 2017-12-01 17:11:31 +01:00
Jean-Sébastien Pédron 808507d33e Update rabbitmq-components.mk 2017-12-01 15:16:37 +01:00
Jean-Sébastien Pédron bf33d6bbb2 Update rabbitmq-components.mk 2017-12-01 11:06:46 +01:00
Jean-Sébastien Pédron fdb3b5b42b Update rabbitmq-components.mk 2017-11-28 14:01:03 +01:00
Jean-Sébastien Pédron a3bc0317d2 Update rabbitmq-components.mk 2017-11-28 13:29:23 +01:00
Bernhard Schwarz 1c8831de95 Replace broken link with correct Markdown 2017-11-17 19:37:13 +00:00
Bernhard Schwarz de6c929ca8 Replace broken link with correct Markdown 2017-11-17 18:30:08 +01:00
Michael Klishin 2ebff17ddc Merge branch 'stable'
Conflicts:
	src/rabbit_mqtt_processor.erl
2017-11-09 14:23:46 +03:00
Michael Klishin a43c001779 Merge branch 'stable' into gh-132 2017-11-09 13:10:49 +03:00
Jean-Sébastien Pédron 53225ba35e Travis CI: Skip testsuite with Erlang R16B03
The emqttc client we use to test the plugin doesn't compile on Erlang
R16B03.

[#152509619]
2017-11-09 09:01:26 +01:00
Luke Bakken 717730b275 Ensure maximum message id value is used when saving to process state
Fixes #132
2017-11-08 17:31:09 -08:00
Jean-Sébastien Pédron a60881654a Travis CI: Update config from rabbitmq-common 2017-11-08 10:21:34 +01:00
Jean-Sébastien Pédron 0b38c1c018 Merge branch 'stable' 2017-11-08 10:20:32 +01:00
Jean-Sébastien Pédron 1efdff0f74 Travis CI: Update config from rabbitmq-common 2017-11-08 10:20:07 +01:00
Luke Bakken ba3d515d88 Add GitHub templates and contributing doc 2017-10-13 15:57:58 -07:00
Jean-Sébastien Pédron 32f1ec40b8 Merge branch 'stable' 2017-10-13 15:10:31 +02:00
Jean-Sébastien Pédron 5213f2c70c Update rabbitmq-components.mk 2017-10-13 14:33:12 +02:00
Jean-Sébastien Pédron 4ca5f6d6ab Update rabbitmq-components.mk 2017-10-13 14:13:19 +02:00
Jean-Sébastien Pédron dfe2680f65 Update rabbitmq-components.mk 2017-10-13 12:15:47 +02:00
Michael Klishin f098a37a46 Update rabbitmq-components.mk 2017-09-13 17:54:32 -04:00
Michael Klishin d93dedc6a2 Update rabbitmq-components.mk 2017-09-13 17:45:38 -04:00
Michael Klishin 3373a4e0f4 Update rabbitmq-components.mk 2017-09-12 19:53:23 -04:00
Michael Klishin 2781d83929 Update rabbitmq-components.mk 2017-09-12 12:41:58 -04:00
Daniil Fedotov 8423164e05 Merge branch 'stable' 2017-08-30 19:20:44 +01:00
Daniil Fedotov ae2be4fe25 Update erlang.mk 2017-08-30 18:46:44 +01:00
Jean-Sébastien Pédron 94640f9707 rabbit_mqtt_process: Close channels after send_will()
This gives a greater chance to the Last Will message to be delivered
because it will implicitely block `rabbit_mqtt_reader` while the
server-side AMQP channel processes the message.

Without this, `rabbit_mqtt_reader` asks the Last Will message to be
sent asynchronously and immediately closes the AMQP connection. The
server-side AMQP channel might thus try to query an already closed
connection.

Fixes #146.
[#150162950]

(cherry picked from commit a2eb8c1be8c52d476ee9ea0ff08ef381a2ca326c)
2017-08-11 14:40:44 +02:00
Jean-Sébastien Pédron d3aaea7244 reader_SUITE: Increase timer in expect_publish() to 5 seconds
This reduces the risk of test failures.

(cherry picked from commit 50e842a200a482a67de6eaf67ab66774f63b48a1)
2017-08-11 14:39:00 +02:00
Jean-Sébastien Pédron ccde25c2a9 rabbit_mqtt_process: Close channels after send_will()
This gives a greater chance to the Last Will message to be delivered
because it will implicitely block `rabbit_mqtt_reader` while the
server-side AMQP channel processes the message.

Without this, `rabbit_mqtt_reader` asks the Last Will message to be
sent asynchronously and immediately closes the AMQP connection. The
server-side AMQP channel might thus try to query an already closed
connection.

Fixes #146.
[#150162950]
2017-08-11 12:29:34 +02:00
Jean-Sébastien Pédron 8a0d88cf1b reader_SUITE: Increase timer in expect_publish() to 5 seconds
This reduces the risk of test failures.
2017-08-11 12:27:40 +02:00
Daniil Fedotov e683048145 Use lager sink API for logs.
Lager sink parse-transform allows us to use a fake module name
to select sinks.
It's more convenient that to use a helper function for every module.

[#149634975]
2017-08-07 14:43:00 +01:00
Michael Klishin 22cc3cfda4 Merge branch 'stable' 2017-07-31 16:32:24 +03:00
Michael Klishin 671c267911 Provide a no-op implementation of MQTT retainer
Closes #136.
2017-07-31 15:32:17 +03:00
Jean-Sébastien Pédron ab46563c45 Merge branch 'stable' 2017-07-31 10:17:08 +02:00
Daniil Fedotov 8a9190a43f Log MQTT processor log messages with connection sink.
Fixes #142
2017-07-27 14:01:17 +01:00
Michael Klishin 5c549f0f51 Erlang/OTP 19.2 is now the minimum supported version.
Part of rabbitmq/rabbitmq-server#1305.

[#149563549]
2017-07-26 19:03:08 +03:00
Michael Klishin 532cc885e1 Update rabbitmq-components.mk 2017-07-26 03:48:32 +03:00
Michael Klishin f591601995 Update rabbitmq-components.mk 2017-07-26 02:27:11 +03:00
Jean-Sébastien Pédron 571f6c5858 Merge branch 'stable' 2017-07-03 12:30:19 +02:00
Jean-Sébastien Pédron 961f4a1e77 rabbit_mqtt_util: Export used functions only
I.e. do not use export_all, which is reported as a warning with Erlang
20.
2017-07-03 12:28:53 +02:00
Arnaud Cogoluègnes a091ce6de9 Merge branch 'master' into rabbitmq-mqtt-139 2017-06-27 10:23:36 +02:00
Jean-Sébastien Pédron 1fc9390e40 Merge branch 'stable' 2017-06-26 18:36:05 +02:00
Arnaud Cogoluègnes 41e5a45dab Propagate client ID to authn with dedicated module
Fixes #139
2017-06-23 16:46:57 +02:00
Jean-Sébastien Pédron cbb353abbd rabbit_net:accept_ack() was moved to rabbit_networking
[#118490793]
2017-06-21 15:38:14 +02:00
Luke Bakken bcbae3757c Whitespace 2017-06-15 10:56:00 -07:00
Michael Klishin 885daa1d6d Merge branch 'master' into rabbitmq-server-1229 2017-06-13 23:56:49 +03:00
Michael Klishin 1c930dbce1 Update rabbitmq-components.mk 2017-06-12 20:16:33 +03:00
Michael Klishin 8b5ebab431 Update rabbitmq-components.mk 2017-06-12 18:42:32 +03:00
Daniil Fedotov a81c3da1e2 Less compile warnings 2017-06-12 14:19:20 +01:00
Michael Klishin 3fda50bccd Make this test more robust
* Handle duplicate keys (see 82d1cb23e9, for instance)
 * Use maps since this test is in master only
 * Use eunit assertions that would print arguments on failures
2017-06-11 01:42:17 +03:00
Daniil Fedotov 5e9ef73325 Merge branch 'stable' 2017-06-09 13:23:56 +01:00
Daniil Fedotov 82d1cb23e9 remove duplicate info item for mqtt connections 2017-06-09 13:23:37 +01:00
Arnaud Cogoluègnes 81ab03c133 Add client_id as an topic authz expandable variable
References rabbitmq/rabbitmq-server#1229
2017-06-07 14:41:59 +02:00
Michael Klishin cd13024d6e Merge branch 'stable' 2017-06-02 18:11:15 +03:00
Michael Klishin ed80c90fb3 Update rabbitmq-components.mk 2017-06-02 17:51:31 +03:00
Daniil Fedotov 4f016da4a7 New CLI helpers API 2017-06-02 10:12:39 +01:00
Michael Klishin cdb6263c14 Update rabbitmq-components.mk 2017-06-02 00:43:27 +03:00
Michael Klishin f40fcee826 Update rabbitmq-components.mk 2017-06-01 18:01:44 +03:00
Jean-Sébastien Pédron c6262a89e1 Merge branch 'stable' 2017-05-16 18:10:32 +02:00
Jean-Sébastien Pédron c167d76ef4 Makefile: Load the new `rabbitmq-early-plugin.mk` early-stage plugin
See the corresponding commit in rabbitmq-common for an explanation.

[#144697185]
2017-05-16 17:36:21 +02:00
Jean-Sébastien Pédron ad7b993a5a Update erlang.mk 2017-05-16 17:36:21 +02:00
Michael Klishin 5a9a0ba264 Merge branch 'stable' 2017-05-11 17:07:04 +03:00
Diana Corbacho c676f9f66c Avoid emitting stats when state is undefined
Stop during initialisation will cause the gen_server to terminate
with `undefined` state, this should be ignored

rabbitmq-mqtt#134
[#145273167]
2017-05-11 14:42:20 +01:00
Diana Corbacho 376bcb1abd Merge remote-tracking branch 'origin/stable' 2017-05-03 12:06:10 +01:00
Diana Corbacho 65ab9ff50f Default to 0 for stats calculation
rabbitmq-management-agent-45
[#144693945]
2017-05-02 14:26:01 +01:00
Daniil Fedotov 28b3c4d46f Replace dicts with maps for mqtt. 2017-04-24 13:45:37 +01:00
Jean-Sébastien Pédron 456f399a81 Merge branch 'stable' 2017-04-19 12:52:44 +02:00
Jean-Sébastien Pédron f7412ca6eb Update erlang.mk 2017-04-19 12:03:57 +02:00
Diana Corbacho 575789d3af Do not emit stats if connection has not been stablished
Ensures stats are not emitted until the connection is stablished.
A non-pid value crashes the stats gc.

rabbitmq-management-agent#42
2017-04-06 21:56:53 +02:00
Michael Klishin 44cbe172c7 Merge pull request #131 from rabbitmq/rabbitmq-management-agent-42
Do not emit stats if connection has not been stablished
2017-04-06 18:52:04 +03:00
Diana Corbacho 36cff50fc4 Do not emit stats if connection has not been stablished
Ensures stats are not emitted until the connection is stablished.
A non-pid value crashes the stats gc.

rabbitmq-management-agent#42
2017-04-06 12:10:05 +01:00
Michael Klishin 6f051b7c1c Ignore test/config_schema_SUITE_data/schema/ 2017-04-02 22:13:36 +03:00
Michael Klishin a1b46471fd Merge branch 'stable' 2017-04-02 22:02:20 +03:00
Michael Klishin fff8f52901 (c) year 2017-04-02 21:48:53 +03:00
Daniil Fedotov 897e194dc8 Config schema test for plugin
Part of [#141481501]
Moved from rabbitmq-server
2017-03-17 11:01:51 +00:00
Jean-Sébastien Pédron 96b51d2bc7 Merge branch 'stable' 2017-03-08 10:06:14 +01:00
Jean-Sébastien Pédron 034ac28159 reader_SUITE: Match the new `connection_coarse_metrics` field
The tuple returned by a read of `connection_coarse_metrics` contains a
new counter at the end. We ignore it but the pattern matching must be
updated.

Before this, the testcase failed with the following error:

    reader_SUITE:stats failed on line 147
    Reason: {badmatch,[{<19064.547.0>,70,30,5578,0}]}
2017-03-08 09:22:57 +01:00
Arnaud Cogoluègnes 2fd3da301b Merge branch 'stable' 2017-02-27 14:04:16 +01:00
Arnaud Cogoluègnes 9bb903010c Remove unused imports in Java test suite 2017-02-27 14:03:51 +01:00
Arnaud Cogoluègnes 45046566f5 Merge branch 'stable'
Conflicts:
	test/java_SUITE_data/src/test/java/com/rabbitmq/mqtt/test/MqttTest.java
2017-02-27 14:03:21 +01:00
Arnaud Cogoluègnes 2c2c24d18f Fix Java test build and test on Java 9
Need to use a recent version of Groovy in the Maven Groovy plugin.
Avoid using CGLIB-based features of Awaitility, as they don't work
on Java 9 (Awaitility is on its way to use Byte Buddy instead of CGLIB,
but no stable release yet).
2017-02-27 11:53:33 +01:00
Michael Klishin f383a3c023 Drive by change: squash a warning 2017-02-23 20:33:42 +03:00
Arnaud Cogoluègnes fba3782869 Check topic access when sending last will
The check is actually already done at the AMQP level, but this commit
adds an "upstream" check, a more specific warning message, and a test.

Fixes #114
2017-02-21 16:13:07 +01:00
Arnaud Cogoluègnes 7954e74eab Add proxy protocol Cuttlefish mapping
Part of rabbitmq/rabbitmq-server#589
2017-02-13 11:58:11 +01:00
Arnaud Cogoluègnes 61f38005df Polish proxy protocol test suite
Add call to rabbit_ct_helpers:testcase_started.

References rabbitmq/rabbitmq-server#589
2017-02-13 10:42:04 +01:00
Michael Klishin d51a810ed5 Update rabbitmq-components.mk 2017-02-11 23:29:35 +03:00
Michael Klishin f6423c5600 Update rabbitmq-components.mk 2017-02-10 11:16:36 +03:00
Michael Klishin fb66c1e7b2 Remove a debug trace 2017-02-10 01:49:41 +03:00
Michael Klishin dca4874b6b Update rabbitmq-components.mk 2017-02-10 01:48:58 +03:00
Michael Klishin e40ebfa6bb Update rabbitmq-components.mk 2017-02-08 16:38:20 +03:00
Arnaud Cogoluègnes 84e9f9fe79 Remove ranch proxy protocol from rabbitmq-components
Will be added once the PRs are merged.

References rabbitmq/rabbitmq-server#589
2017-02-07 18:00:57 +01:00
Arnaud Cogoluègnes 1bc5c7afd2 Add support for proxy protocol
References rabbitmq/rabbitmq-server#589
2017-02-07 17:22:14 +01:00
Michael Klishin f4091998c8 merge branch 'stable' 2017-02-06 19:51:33 +03:00
Michael Klishin 7bfccc2979 Update rabbitmq-components.mk 2017-02-06 19:23:58 +03:00
Michael Klishin 60e6e0923c Merge pull request #116 from rabbitmq/rabbitmq-server-1085
Add topic authorisation for consumption
2017-02-06 01:22:41 +03:00
Jean-Sébastien Pédron c8d1b82fbb Update rabbitmq-components.mk 2017-02-02 17:17:12 +01:00
Michael Klishin 382ae1c42f Don't use UTF-8 when calculating retainer_sup child names
Such conversion isn't safe but also isn't necessary: those
names aren't supposed to be human-readable.

Fixes #123.
2017-02-02 15:22:31 +03:00
Michael Klishin c0ddd6cc7b Don't use UTF-8 when calculating retainer_sup child names
Such conversion isn't safe but also isn't necessary: those
names aren't supposed to be human-readable.

Fixes #123.
2017-02-02 15:20:45 +03:00
Arnaud Cogoluègnes e0db62f69c Merge branch 'master' into rabbitmq-server-1085 2017-01-31 17:38:53 +01:00
Michael Klishin 4c0754f138 merge branch 'stable' 2017-01-31 18:19:31 +03:00
Michael Klishin 79d1b29cc1 Update rabbitmq-components.mk 2017-01-31 18:06:32 +03:00
Diana Corbacho c116f23d90 Merge branch 'stable' 2017-01-27 07:29:16 +00:00
Michael Klishin d0cdaaa0a5 Merge pull request #122 from rabbitmq/rabbitmq-mqtt-121
Notify recv_oct, send_oct, reductions and garbage_collection in core metrics
2017-01-26 23:20:35 +03:00
Michael Klishin 4e55c07d1a Wording 2017-01-26 23:19:42 +03:00
Diana Corbacho 53e1d8e776 Notify recv_oct, send_oct, reductions and garbage_collection in core metrics 2017-01-26 16:15:08 +00:00
Daniil Fedotov 98c44e10f9 Backported part of: A CLI command to list mqtt connections 2017-01-26 15:43:11 +00:00
Michael Klishin 868ae3bb2d Merge branch 'stable' 2017-01-26 14:18:43 +03:00
Michael Klishin 4e231e9339 Avoid double quoting connection names 2017-01-26 14:10:22 +03:00
Michael Klishin f4132d9967 Wording
What we are logging is a payload, not a frame, since
we couldn't parse a frame out of it ;)
2017-01-26 14:06:25 +03:00
Diana Corbacho 0ef4d4a0c1 Improve logging when parsing invalid frames 2017-01-26 10:43:54 +00:00
Michael Klishin b99d77d16f Merge branch 'stable' 2017-01-25 22:23:25 +03:00
Michael Klishin c70a8d3a97 Don't assume stats tables are empty
We don't need them to be; what we care about is that
in this particular test, no new entries are inserted.
2017-01-25 22:15:39 +03:00
Diana Corbacho 12f91458f0 Add test for handling invalid frames 2017-01-25 16:21:59 +00:00
Diana Corbacho ef64088bc3 Skip stats notification without connection pid 2017-01-25 13:43:55 +00:00
Arnaud Cogoluègnes 96aaf35900 Add topic authorisation for consumption
Part of rabbitmq/rabbitmq-server#1085
2017-01-23 12:10:23 +01:00
Michael Klishin 8eb40110d3 Wording 2017-01-16 16:16:54 +03:00
Arnaud Cogoluègnes 8e505e9af0 Let only message in topic permission violation log
Not tuple.

References rabbitmq/rabbitmq-server#505
2017-01-16 10:54:35 +01:00
Arnaud Cogoluègnes 3695c5826e Handle topic authorisation failure properly
Plugin handles exit signal coming from the AMPQ core,
logs, and closes the client connnection (instead of letting
the whole process tree crash with scary log messages).

References rabbitmq/rabbitmq-server#505
2017-01-16 09:54:16 +01:00
Arnaud Cogoluègnes 85636953a4 Use check_topic_access on publishing
check_resource_access used to be called with
the MQTT topic as resource name and kind = topic.
It makes more sense now to call check_topic_access
with the exchange as resource name, kind = topic,
and routing key in the context.

References rabbitmq/rabbitmq-server#505
2016-12-29 16:34:19 +01:00
Michael Klishin 500b66087a Merge branch 'stable' 2016-12-20 01:39:05 +03:00
Michael Klishin 6d94828a8d Revert "Give global policies more time to propagate"
This reverts commit 4e3849b0c3.
2016-12-20 01:35:41 +03:00
Michael Klishin 8a23720840 Merge branch 'stable' 2016-12-20 01:17:45 +03:00
Michael Klishin 4e3849b0c3 Give global policies more time to propagate
Sigh, CI.
2016-12-20 01:13:01 +03:00
Michael Klishin cfcde1d143 Merge branch 'stable' 2016-12-20 00:50:04 +03:00
Michael Klishin b6c6dc7769 Log in a more human readable format 2016-12-20 00:42:06 +03:00
Michael Klishin 1ab92e897c Wording 2016-12-19 22:51:05 +03:00
Arnaud Cogoluègnes e250fa048f Use coercion module for integer-to-binary coercion
Fixes #111
2016-12-19 17:53:20 +01:00
Arnaud Cogoluègnes 87628f9f51 Use binary for port-to-vhost mapping key
Behaves better as a JSON document key than an integer.

Fixes #111
2016-12-19 17:36:18 +01:00
Arnaud Cogoluègnes b8344cdc27 Map client connection vhost to a port
Fixes #111
2016-12-19 15:00:43 +01:00
Michael Klishin e265ffc9dc Merge branch 'stable'
Conflicts:
	.travis.yml
2016-12-17 03:23:38 +03:00
Michael Klishin 6e40d82276 [travis] Try 18.2 instead of 18.3
18.3 is the only version that repeatedly fails
(could be due to known TLS bugs).
2016-12-17 03:01:23 +03:00
Michael Klishin 1e3831cc13 Test against 18.3, 19.1, 19.2 on Travis 2016-12-17 02:49:15 +03:00
Arnaud Cogoluègnes d1c2474a89 Merge branch 'stable' 2016-12-16 10:59:10 +01:00
Michael Klishin 2d3c004efb Merge branch 'stable' into rabbitmq-mqtt-73 2016-12-15 17:46:24 +03:00
Arnaud Cogoluègnes 8749233066 Merge branch 'stable' 2016-12-15 15:42:36 +01:00
Arnaud Cogoluègnes 7424551de0 Fix race condition in test 2016-12-15 15:38:42 +01:00
Arnaud Cogoluègnes 6d53781e64 Merge branch 'stable' 2016-12-15 14:23:55 +01:00
Arnaud Cogoluègnes 335997d140 Use clean sessions in last will retained test 2016-12-15 14:23:23 +01:00
Arnaud Cogoluègnes e37b8135b1 Merge branch 'stable'
Conflicts:
	test/java_SUITE_data/src/test/java/com/rabbitmq/mqtt/test/MqttTest.java
2016-12-15 12:50:16 +01:00
Arnaud Cogoluègnes 20d35a1482 Use awaitility for Java tests 2016-12-15 12:46:14 +01:00
Arnaud Cogoluègnes 2a9a6cb261 Add test case for cert user/vhost mapping
Fixes #73
2016-12-13 17:31:34 +01:00
Arnaud Cogoluègnes 7e03af30fd Introduce mqtt_default_vhosts global parameter
Fixes #73
2016-12-13 14:46:15 +01:00
Jean-Sébastien Pédron 77a6a0fc65 Travis CI: Import changes from rabbitmq-auth-backend-amqp 2016-12-12 14:22:41 +01:00
Arnaud Cogoluègnes d424894dc6 Test connection fails when vhost not allowed for cert user 2016-12-12 10:17:29 +01:00
Jean-Sébastien Pédron 7838e22d2e Merge branch 'stable' 2016-12-09 19:24:31 +01:00
Arnaud Cogoluègnes 8f9e8489c2 Optionally map user certificate to virtual host
Use a global runtime parameter to map the DN of the certificate
to a virtual host.

Fixes #73
2016-12-09 16:48:47 +01:00
Jean-Sébastien Pédron cf0a1d656a Update rabbitmq-components.mk 2016-12-08 19:14:49 +01:00
Jean-Sébastien Pédron b87baed8bb Do not use -include_lib() with own headers
This fixes the build outside of an Umbrella-like setup, ie. when
dependencies of this plugin are put into the `deps` subdirectory.
2016-12-08 18:07:13 +01:00
Jean-Sébastien Pédron 6e31a5ebc2 Travis CI: Use Ubuntu Trusty image to have access to Elixir
Also, required `sudo` so a VM is used instead of a container. This makes
the test much longer, but allows us to install non-whitelisted packages
such as xsltproc.
2016-12-08 17:50:08 +01:00
Jean-Sébastien Pédron 8216cb12f1 Merge branch 'stable' 2016-12-07 15:48:04 +01:00
Arnaud Cogoluègnes 88820d02d9 Don't crash for clients without a last will
References #74
2016-12-07 11:21:47 +01:00
Michael Klishin b3f2bcfaed Merge branch 'stable' into rabbitmq-mqtt-100 2016-12-06 18:54:29 +03:00
Jean-Sébastien Pédron 1f0feb3399 Move from .app.src to Makefile variables
This is the recommended way with Erlang.mk.

By default, the version is inherited from rabbitmq-server-release when
the source archive is created, or computed from git-describe(1) (see
`rabbitmq-components.mk`). One can override the version from the command
line by setting the `PROJECT_VERSION` variable.

[#130992027]
2016-12-06 16:31:27 +01:00
Arnaud Cogoluègnes b1627afe81 Gracefully close connections to non-existent virtual hosts
Return CONNACK 4 code when the virtual host doesn't exist.
The MQTT description for this return code states "The data in
the user name or password is malformed", which not exactly
accurate but better than a pending or abruptly closed connection.
The server logs also a more meaningful message.

Fixes #100
2016-12-06 16:09:50 +01:00
Michael Klishin dca3081a5d Merge pull request #107 from rabbitmq/rabbitmq-cli-121
A CLI command to list mqtt connections
2016-12-06 18:07:25 +03:00
Michael Klishin 4a6a231484 Cosmetics 2016-12-06 18:06:44 +03:00
Michael Klishin a077b95f86 Merge branch 'stable' 2016-12-06 17:56:21 +03:00
Daniil Fedotov f411a74e10 Test list_mqtt_connections command 2016-12-06 14:24:45 +00:00
Arnaud Cogoluègnes 388d949645 Support Erlang string vhosts in retainer supervisor
Fixes #86
2016-12-06 11:03:02 +01:00
Michael Klishin 76c0a415e5 Merge branch 'master' into rabbitmq-cli-121 2016-12-05 19:56:24 +03:00
Daniil Fedotov a025592ae9 A CLI command to list mqtt connections 2016-12-05 14:58:19 +00:00
Michael Klishin bc8e2541bd Merge branch 'stable' 2016-12-05 14:27:40 +03:00
Michael Klishin 97aa1ef4ae Destructure this right in function head 2016-12-05 14:25:15 +03:00
Arnaud Cogoluègnes a7a0174a41 Retain last will message
Fixes #74
2016-12-05 11:05:30 +01:00
Michael Klishin 74fcf5ef04 Merge branch 'stable' 2016-12-01 14:19:42 +03:00
Michael Klishin c5e57ba510 Merge branch 'stable' 2016-11-30 18:56:37 +03:00
Michael Klishin 7c6382bd90 Merge branch 'stable' 2016-11-29 21:18:52 +03:00
Michael Klishin 73d3a43a14 Update rabbitmq-components.mk 2016-11-29 20:59:36 +03:00
Jean-Sébastien Pédron ac1a925c40 Merge branch 'stable' 2016-11-25 11:47:44 +01:00
Jean-Sébastien Pédron 4fe43b124e Update rabbitmq-components.mk 2016-11-25 10:51:00 +01:00
Jean-Sébastien Pédron f63b487631 Merge branch 'stable' 2016-11-25 10:36:19 +01:00
Jean-Sébastien Pédron a988711e4b Update rabbitmq-components.mk 2016-11-25 10:08:21 +01:00
Jean-Sébastien Pédron d62c1031f8 Merge branch 'stable' into rabbitmq-management-236 2016-11-24 12:10:39 +01:00
Jean-Sébastien Pédron 471563af1f Merge branch 'stable' 2016-11-24 10:32:21 +01:00
Jean-Sébastien Pédron 5c8dfedb04 Add rabbitmq_ct_client_helpers to TEST_DEPS 2016-11-24 10:32:13 +01:00
Jean-Sébastien Pédron 2d2f525ef7 Update rabbitmq-components.mk 2016-11-23 18:06:05 +01:00
Gerhard Lazu 6918e06037 Merge branch 'stable' 2016-11-22 16:28:04 +00:00
Gerhard Lazu 5fdcfdef91 Update erlang.mk 2016-11-22 16:19:52 +00:00
Gerhard Lazu 5767f5106c Update rabbitmq-components.mk 2016-11-22 16:16:38 +00:00
Jean-Sébastien Pédron e5a9241143 Update erlang.mk 2016-11-14 11:57:17 +01:00
Jean-Sébastien Pédron b079e685c9 Update rabbitmq-components.mk 2016-11-10 16:56:45 +01:00
Daniil Fedotov 8064f4b2f2 Merge branch 'stable' 2016-11-04 15:27:24 +00:00
Alexey Lebedeff 7697687db9 Fix `clean` make target for source dist tarballs
Source dist tarballs made by `rabbitmq-server-release` doesn't include
testsuites, so `clean` target breaks under such conditions.
2016-10-19 17:26:59 +03:00
Daniil Fedotov 7cd6fdec7e Merge branch 'stable' 2016-09-28 11:39:54 +01:00
Daniil Fedotov c610ca1c0e Do not log java test output 2016-09-28 11:39:44 +01:00
Arnaud Cogoluègnes e0aac5b183 Merge branch 'stable' 2016-09-27 15:34:09 +02:00
Arnaud Cogoluègnes 46d0977209 Use quiet mode for Maven 2016-09-27 15:33:31 +02:00
Arnaud Cogoluègnes 7f43ea05d8 Merge branch 'stable' 2016-09-27 13:56:16 +02:00
Arnaud Cogoluègnes 2d442353ee Refactor Java tests
Use JUnit4-style tests, increase max-in-flight messages to make
tests more resilient, synchronize test variables.
2016-09-27 13:32:40 +02:00
Jean-Sébastien Pédron e197159475 Merge branch 'stable' into rabbitmq-management-236 2016-09-27 12:45:03 +02:00
Arnaud Cogoluègnes c076259000 Specify file format for client certificate
Use PKCS12 to load the KeyStore object, not JKS. Java 8
manages to load the certificate anyway, but not Java 6, nor Java  7.
2016-09-27 10:30:44 +02:00
Daniil Fedotov 9eab2c7704 Report java test result in test log 2016-09-26 13:45:05 +01:00
Daniil Fedotov e8b4a5bd08 Set up travis to install maven 2016-09-26 10:55:51 +01:00
Daniil Fedotov abe00f3d1a Cleanup comments 2016-09-23 18:06:05 +01:00
Daniil Fedotov 507ef875ea test dir cleanup 2016-09-23 17:19:03 +01:00
Daniil Fedotov 493805fd95 Run tests via maven 2016-09-23 16:42:21 +01:00
Jean-Sébastien Pédron 93953923d2 Merge branch 'stable' 2016-09-23 16:17:43 +02:00
Jean-Sébastien Pédron 1c8ebee87c Update rabbitmq-components.mk 2016-09-23 11:23:07 +02:00
Jean-Sébastien Pédron 6ec83d7d05 Update erlang.mk 2016-09-22 17:56:52 +02:00
Jean-Sébastien Pédron b17725bc18 rabbitmq_mqtt.app: Depend on ranch and rabbit_common 2016-09-20 11:14:22 +02:00
Jean-Sébastien Pédron d617d58a25 Makefile: Explicitely list all DEPS
Sync rabbitmq-components.mk with rabbitmq-common to remove automatic
DEPS handling.

[#130086871]
2016-09-20 11:14:17 +02:00
Jean-Sébastien Pédron f2a63e6979 Update erlang.mk 2016-09-20 11:12:56 +02:00
Jean-Sébastien Pédron d4de34f0e9 Merge branch 'stable' 2016-09-15 16:41:29 +02:00
Jean-Sébastien Pédron c48700f441 Update rabbitmq-components.mk 2016-09-15 15:47:22 +02:00
Daniil Fedotov a16aab594c Merge branch 'stable' 2016-09-06 17:58:24 +01:00
Daniil Fedotov 673a89127e Added ranch as a dependency to build ranch_protocol behaviour 2016-09-06 17:57:33 +01:00
Jean-Sébastien Pédron 222fa8d27a Merge branch 'stable' 2016-09-02 16:07:17 +02:00
Jean-Sébastien Pédron 90441b5b63 Update rabbitmq-components.mk 2016-09-02 13:22:26 +02:00
Jean-Sébastien Pédron b0c24f04a2 Makefile: No need to filter out rabbitmq_test from TEST_DEPS anymore
[#127356157]
2016-09-02 12:29:41 +02:00
Jean-Sébastien Pédron f549b61d3f Update rabbitmq-components.mk 2016-09-02 12:03:32 +02:00
Michael Klishin c510fef54a Merge branch 'stable' 2016-09-02 02:07:46 +03:00
Michael Klishin 67fd94e7c0 Merge pull request #98 from rabbitmq/rabbitmq-mqtt-96
Fixed authentication logic.
2016-09-02 03:04:17 +04:00
Michael Klishin d318ca2fa3 Rename 2016-09-02 01:54:57 +03:00
Michael Klishin ee213084f8 Wording, naming 2016-09-02 01:33:34 +03:00
Daniil Fedotov e8ca3ac8ff test comments 2016-09-01 17:21:02 +01:00
Daniil Fedotov 4b688b9e63 Make MQTT authentication correspond with docs. Added tests 2016-09-01 16:54:51 +01:00
kjnilsson 9067750d8d write connection_stats metrics 2016-09-01 13:07:17 +01:00
Daniil Fedotov e348357392 Test empty password login 2016-09-01 10:43:14 +01:00
Jean-Sébastien Pédron 5573d28853 Travis CI: Do not test on Erlang 18.3
RabbitMQ fails to start because there is a regression in ssl which makes
Ranch unhappy.
2016-08-31 15:22:46 +02:00
Jean-Sébastien Pédron 72b02870f4 Merge branch 'stable' 2016-08-31 15:17:28 +02:00
Jean-Sébastien Pédron 638747c394 Travis CI: Require ant and ant-optional packages
Add a comment to explain why we can't test on R16B03: emqttc requires
Erlang 17.0.

Do not test on Erlang 18.3: RabbitMQ fails to start because there is a
regression in ssl which makes Ranch unhappy.
2016-08-31 14:33:20 +02:00
Jean-Sébastien Pédron 59523f1832 java_SUITE: Fetch dependencies using Maven
Thus, we do not use to clone and build org.eclipse.paho.client.mqttv3,
nor we depend on a local clone of rabbitmq-java-client.

While here, move all java_SUITE-specific files to `java_SUITE_data`.
2016-08-31 13:54:28 +02:00
Michael Klishin 93e9430f38 Merge pull request #97 from rabbitmq/fix-java-testsuite
java_SUITE: Fetch dependencies using Maven
2016-08-31 13:36:38 +03:00
Jean-Sébastien Pédron 212d9024a7 Travis CI: Only test against Erlang 18.3 and 19.0 2016-08-31 12:11:21 +02:00
Jean-Sébastien Pédron 08c29be1cf java_SUITE: Fetch dependencies using Maven
Thus, we do not use to clone and build org.eclipse.paho.client.mqttv3,
nor we depend on a local clone of rabbitmq-java-client.

While here, move all java_SUITE-specific files to `java_SUITE_data`.
2016-08-31 10:15:21 +02:00
Daniil Fedotov 3bc5278186 Non negative integer validator 2016-08-10 18:12:23 +01:00
Daniil Fedotov e405c725f2 Non negative validator for tcp linger 2016-08-10 17:56:21 +01:00
Daniil Fedotov 04eddc46cf Add tcp linger option to schema 2016-08-10 17:07:03 +01:00
Michael Klishin 6e0c933474 Update rabbitmq-components.mk 2016-07-14 15:44:12 +03:00
Michael Klishin fd2e37cb39 Update rabbitmq-components.mk 2016-07-14 15:37:33 +03:00
Michael Klishin d94ffc2238 Update rabbitmq-components.mk 2016-07-14 13:40:42 +03:00
Michael Klishin f1ebd56dbb Update rabbitmq-components.mk 2016-07-14 13:20:02 +03:00
Michael Klishin a17606bc83 Merge branch 'stable' 2016-07-12 08:26:34 -07:00
Michael Klishin 93c3488afb Test against a few more versions 2016-07-12 08:26:09 -07:00
Michael Klishin 969f3e966f Merge branch 'stable' 2016-07-12 08:25:40 -07:00
kjnilsson c7627fdccc remove R16 from travis configuration 2016-07-12 13:06:57 +01:00
kjnilsson b76cfbe5dc Move to common test
travis config
2016-07-12 12:46:11 +01:00
Jean-Sébastien Pédron 55b96b6dc7 Merge branch 'stable' 2016-06-29 16:55:01 +02:00
Jean-Sébastien Pédron 39251c5fca Use the new -spec format
The old format is removed in Erlang 19.0, leading to build errors.

Also, get rid of the `use_specs` macro and thus always define -spec() &
friends.

While here, unnify the style of -type and -spec.

References rabbitmq/rabbitmq-server#860.
[#118562897]
[#122335241]
2016-06-29 16:53:00 +02:00
Jean-Sébastien Pédron 13b49990ed Git: Ignore `xrefr` 2016-06-29 16:50:56 +02:00
Daniil Fedotov eb72bff49a Set bounded timeout for OTP workers 2016-06-17 01:31:32 +03:00
Daniil Fedotov 8a176cd37b Set bounded timeout for OTP workers 2016-06-16 13:12:03 +01:00
Michael Klishin 283526502e Merge branch 'stable' 2016-05-29 23:35:45 +03:00
Michael Klishin 0db52c2337 Update rabbitmq-components.mk 2016-05-29 23:21:55 +03:00
Michael Klishin 773c79673f Update CONTRIBUTING.md, add CODE_OF_CONDUCT.md 2016-05-28 09:55:39 -07:00
Michael Klishin c13c2357f7 Update CONTRIBUTING.md, add CODE_OF_CONDUCT.md 2016-05-28 14:22:50 +03:00
Daniil Fedotov 2626696498 Formatting 2016-05-20 14:07:04 +01:00
Daniil Fedotov fcdff84cca Merge pull request #80 from tiagodeoliveira/unnecessary_user_login_check
Removing unnecessary check_user_login on process_login
2016-05-20 14:06:56 +01:00
Daniil Fedotov f2b4d32693 Formatting 2016-05-20 14:04:10 +01:00
Daniil Fedotov 6a5107038b Merge pull request #80 from tiagodeoliveira/unnecessary_user_login_check
Removing unnecessary check_user_login on process_login
2016-05-20 13:53:17 +01:00
Tiago Oliveira 4e7d7abc17 Using internal user from amqp client 2016-05-18 10:11:50 -03:00
kjnilsson 2ab906e2c9 Merge branch 'stable' 2016-05-18 13:22:06 +01:00
Karl Nilsson 26bb50e78b Update rabbitmq-components.mk 2016-05-18 12:48:01 +01:00
Michael Klishin de73bcd8ba Merge pull request #81 from rabbitmq/rabbitmq-server-546
Use erlang 18.3 only in travis
2016-05-17 12:04:43 +03:00
Michael Klishin ad802f0bde Update rabbitmq-components.mk 2016-05-17 11:17:54 +03:00
Michael Klishin 2d07ee6ff2 Update rabbitmq-components.mk 2016-05-17 10:16:10 +03:00
Daniil Fedotov 18b8cfa7cf Use erlang 18.3 only in travis 2016-05-12 10:58:25 +01:00
Tiago Oliveira 61c3f61b64 Removing unnecessary check_user_login that executes authentication method twice.
During the amqp_connection:start the check_user_login method is already executed, when it is called again it will call the user_login_authentication again, it makes the authentication to be executed twice in a role, and it raises a problem when using salted passwords.
2016-05-11 14:35:28 -03:00
Daniil Fedotov 917f035bae Stub for broker_version_requirements 2016-04-28 09:58:54 +01:00
Michael Klishin 6c16d80527 Merge branch 'stable' 2016-04-25 08:31:30 -07:00
Michael Klishin 2c8eec7dc1 Update Paho Java git repo location 2016-04-25 08:22:13 -07:00
Michael Klishin 84871d5e7f Merge branch 'stable' 2016-04-22 22:36:02 +01:00
Daniil Fedotov 5c98b84a56 Merge branch 'stable' 2016-04-22 13:32:57 +01:00
Daniil Fedotov e72eb1acbf Revert redundant nack 2016-04-22 12:32:01 +01:00
Daniil Fedotov 0cae4fc7fe Set session_present flag 2016-04-22 12:28:08 +01:00
Daniil Fedotov 2d2b8f96d8 Tests message redelivery when resuming session 2016-04-22 12:25:30 +01:00
Michael Klishin 54ad6b4260 Merge branch 'master' into rabbitmq-server-550 2016-03-23 20:01:39 +03:00
Michael Klishin f72cca58a1 Merge branch 'stable' 2016-03-23 17:20:56 +03:00
Michael Klishin 7e50e27c32 Update rabbitmq-components.mk 2016-03-23 17:13:41 +03:00
Michael Klishin bc28f75d1e Trailing ws 2016-03-23 12:26:50 +00:00
Daniil Fedotov bc81db7199 schema testing fixes 2016-03-23 12:26:50 +00:00
Daniil Fedotov a1467d8aca Missing listener options 2016-03-23 12:26:50 +00:00
Daniil Fedotov 677a66b990 none option for tcp_listen_options config 2016-03-23 12:26:50 +00:00
Daniil Fedotov 2f47e113f4 cuttlefish schema 2016-03-23 12:26:50 +00:00
Michael Klishin 66bc029d05 Merge branch 'stable' 2016-03-09 23:33:19 +03:00
Michael Klishin 328e2043e1 Emit stats unconditionally
...of connection (flow control) state.

This makes it much easier to reason about flow control
state when looking at the management UI or monitoring tools
that poll HTTP API.
Now that rabbitmq/rabbitmq-management#41 is merged, there are
few arguments against always emitting stats.

Fixes #71.
2016-03-08 16:03:53 +03:00
Michael Klishin a72c9e14d2 Merge branch 'stable' 2016-03-05 11:27:29 +03:00
Michael Klishin 44389f778b In fact, even more 2016-03-05 11:21:00 +03:00
Michael Klishin 72bfeef88b Wait a bit more 2016-03-05 11:20:54 +03:00
Michael Klishin 9b7c29841b Cosmetics 2016-03-05 11:09:38 +03:00
Michael Klishin 706d82dafb Explain 2016-03-05 11:09:26 +03:00
Michael Klishin 4c5aecf0f0 skip_publishes => expect_publishes 2016-03-05 11:04:56 +03:00
Michael Klishin 1078f5787f Trailing ws 2016-03-05 11:01:20 +03:00
Michael Klishin fd4d1a9b1d Trailing ws 2016-03-05 10:59:35 +03:00
Michael Klishin c09578b19d Ignore temp JUnit runner files 2016-03-05 10:58:53 +03:00
Michael Klishin ff28d87d9a Compile 2016-03-05 10:57:29 +03:00
Michael Klishin f6d613871a defered => deferred 2016-03-05 10:56:53 +03:00
Daniil Fedotov 98cf125e39 Defer last receive after blocking 2016-03-04 20:33:01 +00:00
Michael Klishin 25538025df Merge branch 'stable' 2016-03-04 14:45:33 +03:00
Michael Klishin b12d16ef71 Use 0 for frame_max
Atoms break HTTP API clients in statically typed languages, e.g. Go
and Java
2016-03-04 13:58:59 +03:00
Michael Klishin 30ca7ce8c1 Set product to "MQTT client"
Not much more specific but a bit more suitable.
2016-03-04 13:35:53 +03:00
Michael Klishin 15d23e4474 Cosmetics 2016-03-04 13:34:53 +03:00
Loïc Hoguin 439d8521aa Emit stats for management UI 2016-03-03 14:59:53 +01:00
Loïc Hoguin 738f263798 MQTT connections use exactly one channel 2016-03-03 14:59:53 +01:00
Loïc Hoguin 7b42c20b7e Allow passing the adapter info on processor init 2016-03-03 14:59:53 +01:00
Michael Klishin c619f638ee Merge branch 'stable' 2016-03-03 14:38:16 +03:00
Daniil Fedotov 6b5de44f9c Tests for mqtt blocking 2016-03-02 16:57:48 +00:00
Daniil Fedotov 024586071c conserve_resources arguments 2016-03-02 15:07:20 +00:00
Daniil Fedotov d1685b08fd More tests to check QoS2 is not ignored 2016-01-27 12:05:08 +00:00
Daniil Fedotov 64f5911ec2 Downgrade publishes if QoS = 2 to QoS = 1 2016-01-12 18:02:37 +00:00
Loïc Hoguin 59d4eddeef Make number of Ranch acceptors configurable 2016-01-12 11:31:48 +01:00
Michael Klishin a01ee29b6c Wording 2016-01-09 17:13:41 +03:00
Daniil Fedotov be1555b469 rename flag to received_connect_frame 2016-01-09 17:13:41 +03:00
Daniil Fedotov 17e4c707c6 Log MQTT connection. 2016-01-09 17:13:41 +03:00
Daniil Fedotov 954016c69f Log MQTT connection start and close with debug if no data received 2016-01-09 17:13:41 +03:00
Michael Klishin d17a2f3028 Cosmetics 2016-01-09 17:13:41 +03:00
Loïc Hoguin e151b6e072 Make send method configurable and export useful functions
Needed for the new Web-MQTT plugin.
2016-01-09 17:13:41 +03:00
Michael Klishin 7f0f7a7e36 Cosmetics 2016-01-08 02:26:38 +03:00
Loïc Hoguin 1f1cb7ab9b Make send method configurable and export useful functions
Needed for the new Web-MQTT plugin.
2016-01-08 02:26:32 +03:00
Michael Klishin 9ba1da7434 Update (c) info 2016-01-01 12:59:18 +03:00
Pierre Fenoll 62d865b739 .gitignore: make absolute paths relative 2015-12-30 07:09:01 +03:00
Jean-Sébastien Pédron 41b2cc1c5a Update erlang.mk 2015-12-18 20:34:14 +01:00
Jean-Sébastien Pédron 97e551919e Sync with upstream build.config 2015-12-18 20:33:03 +01:00
Jean-Sébastien Pédron f89122a48e Update rabbitmq-components.mk 2015-12-18 19:08:09 +01:00