summaryrefslogtreecommitdiff
path: root/deps/rabbit_common/src/rabbit_writer.erl
Commit message (Collapse)AuthorAgeFilesLines
* Fix all dependencies for the dialyzerAlexey Lebedeff2023-02-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | This is the latest commit in the series, it fixes (almost) all the problems with missing and circular dependencies for typing. The only 2 unsolved problems are: - `lg` dependency for `rabbit` - the problem is that it's the only dependency that contains NIF. And there is no way to make dialyzer ignore it - looks like unknown check is not suppressable by dialyzer directives. In the future making `lg` a proper dependency can be a good thing anyway. - some missing elixir function in `rabbitmq_cli` (CSV, JSON and logging related). - `eetcd` dependency for `rabbitmq_peer_discovery_etcd` - this one uses sub-directories in `src/`, which confuses dialyzer (or our bazel machinery is not able to properly handle it). I've tried the latest rules_erlang which flattens directory for .beam files, but it wasn't enough for dialyzer - it wasn't able to find core erlang files. This is a niche plugin and an unusual dependency, so probably not worth investigating further.
* Rename frame to packetDavid Ansari2023-01-241-1/+1
| | | | | | | | | | The MQTT protocol specs define the term "MQTT Control Packet". The MQTT specs never talk about "frame". Let's reflect this naming in the source code since things get confusing otherwise: Packets belong to MQTT. Frames belong to AMQP 0.9.1 or web sockets.
* Decrease memory usage of queue_type stateDavid Ansari2023-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, 1 MQTT publisher publishing to 1 Million target classic queues requires around 680 MB of process memory. After this commit, it requires around 290 MB of process memory. This commit requires feature flag classic_queue_type_delivery_support and introduces a new one called no_queue_name_in_classic_queue_client. Instead of storing the binary queue name 4 times, this commit now stores it only 1 time. The monitor_registry is removed since only classic queue clients monitor their classic queue server processes. The classic queue client does not store the queue name anymore. Instead the queue name is included in messages handled by the classic queue client. Storing the queue name in the record ctx was unnecessary. More potential future memory optimisations: * When routing to destination queues, looking up the queue record, delivering to queue: Use streaming / batching instead of fetching all at once * Only fetch ETS columns that are necessary instead of whole queue records * Do not hold the same vhost binary in memory many times. Instead, maintain a mapping. * Remove unnecessary tuple fields.
* (c) year bump: 2022 => 2023Michael Klishin2023-01-011-1/+1
|
* Fix dialyzer warnings in rabbit_commonRin Kuryloski2022-12-021-1/+1
|
* Bump (c) yearMichael Klishin2022-03-211-1/+1
|
* Bump (c) yearMichael Klishin2021-01-221-1/+1
|
* Switch to Mozilla Public License 2.0 (MPL 2.0)Jean-Sébastien Pédron2020-07-071-12/+3
|
* Update copyright (year 2020)Jean-Sébastien Pédron2020-03-101-1/+1
|
* (c) bumpMichael Klishin2019-12-291-1/+1
| | | | (cherry picked from commit 013ba83abcce06c52c12e2a41e728c1e2399be60)
* rabbit_writer state: gc_threshold => writer_gc_threshold, references #343Michael Klishin2019-12-241-3/+3
|
* Bump default GC threshold to the same 1GBMichael Klishin2019-12-201-6/+6
|
* make garbage collector threshold configurableANycz2019-12-111-19/+53
|
* URL CleanupSpring Operator2019-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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://erlang.org/doc/apps/erts/erl_ext_dist.html (200) with 1 occurrences could not be migrated: ([https](https://erlang.org/doc/apps/erts/erl_ext_dist.html) result ConnectTimeoutException). * http://erlang.org/doc/man/erlang.html (200) with 1 occurrences could not be migrated: ([https](https://erlang.org/doc/man/erlang.html) result ConnectTimeoutException). * 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). * http://host (UnknownHostException) with 1 occurrences migrated to: https://host ([https](https://host) result UnknownHostException). * http://host:port/foo (UnknownHostException) with 2 occurrences migrated to: https://host:port/foo ([https](https://host:port/foo) result UnknownHostException). * http://www.cs.indiana.edu/~burger/fp/index.html (301) with 1 occurrences migrated to: https://cs.indiana.edu/~burger/fp/index.html ([https](https://www.cs.indiana.edu/~burger/fp/index.html) result 404). ## 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://en.wikipedia.org/wiki/X86-64 with 1 occurrences migrated to: https://en.wikipedia.org/wiki/X86-64 ([https](https://en.wikipedia.org/wiki/X86-64) 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://lukego.livejournal.com/6753.html with 1 occurrences migrated to: https://lukego.livejournal.com/6753.html ([https](https://lukego.livejournal.com/6753.html) result 200). * http://ninenines.eu with 6 occurrences migrated to: https://ninenines.eu ([https](https://ninenines.eu) result 200). * http://semver.org/ with 1 occurrences migrated to: https://semver.org/ ([https](https://semver.org/) result 200). * http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) 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.erlang.org/ with 2 occurrences migrated to: https://www.erlang.org/ ([https](https://www.erlang.org/) result 200). * http://www.mail-archive.com/asn1@asn1.org/msg00460.html with 1 occurrences migrated to: https://www.mail-archive.com/asn1@asn1.org/msg00460.html ([https](https://www.mail-archive.com/asn1@asn1.org/msg00460.html) result 200). * http://www.rabbitmq.com/ with 2 occurrences migrated to: https://www.rabbitmq.com/ ([https](https://www.rabbitmq.com/) result 200). * http://www.rabbitmq.com/amqp-0-9-1-errata.html with 1 occurrences migrated to: https://www.rabbitmq.com/amqp-0-9-1-errata.html ([https](https://www.rabbitmq.com/amqp-0-9-1-errata.html) result 200). * http://www.rabbitmq.com/memory.html with 1 occurrences migrated to: https://www.rabbitmq.com/memory.html ([https](https://www.rabbitmq.com/memory.html) result 200). * http://www.rebar3.org with 1 occurrences migrated to: https://www.rebar3.org ([https](https://www.rebar3.org) result 200). * http://code.google.com/p/clink/issues/detail?id=141 with 1 occurrences migrated to: https://code.google.com/p/clink/issues/detail?id=141 ([https](https://code.google.com/p/clink/issues/detail?id=141) result 301). * 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://msdn.microsoft.com/en-us/library/aa366778 with 1 occurrences migrated to: https://msdn.microsoft.com/en-us/library/aa366778 ([https](https://msdn.microsoft.com/en-us/library/aa366778) result 301). * http://msdn.microsoft.com/en-us/library/bb540814 with 1 occurrences migrated to: https://msdn.microsoft.com/en-us/library/bb540814 ([https](https://msdn.microsoft.com/en-us/library/bb540814) result 301). * http://rabbitmq.com/documentation.html with 1 occurrences migrated to: https://rabbitmq.com/documentation.html ([https](https://rabbitmq.com/documentation.html) 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.erlang.org/doc/system_principles/versions.html with 1 occurrences migrated to: https://www.erlang.org/doc/system_principles/versions.html ([https](https://www.erlang.org/doc/system_principles/versions.html) result 301). * http://www.mozilla.org/MPL/ with 66 occurrences migrated to: https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) 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).
* Merge branch 'fix-dialyzer-errors' into fix-dialyzer-errors-in-masterJean-Sébastien Pédron2018-02-011-1/+1
|\
| * rabbit_heartbeat, rabbit_writer: system_terminate() doesn't returnJean-Sébastien Pédron2018-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | Thus, use the correct return type of `no_return()`. Even if it's defined as `none()` according to the documentation, it doesn't have the same semantic. The warning was reported by Dialyzer. [#153850881]
| * rabbit_writer: Use rabbit_amqqueue_common instead of rabbit_amqqueueJean-Sébastien Pédron2017-06-261-3/+3
| | | | | | | | | | | | | | This is to prepare the move of rabbit_amqqueue to rabbitmq-server to solve a dependency of rabbitmq-common on rabbitmq-server. [#118490793]
| * Move rabbit_basic:maybe_gc_large_msg() and rabbit_basic:msg_size() to ↵Jean-Sébastien Pédron2017-06-261-1/+30
| | | | | | | | | | | | | | | | | | | | | | rabbit_writer rabbit_basic still has function wrappers to avoid any API breakage. This is to prepare the move of rabbit_basic to rabbitmq-server to solve a dependency of rabbitmq-common on rabbitmq-server. [#118490793]
* | Add a macro to identify processes in Looking GlassLoïc Hoguin2017-12-121-0/+1
| |
* | rabbit_writer: Use rabbit_amqqueue_common instead of rabbit_amqqueueJean-Sébastien Pédron2017-06-261-3/+3
| | | | | | | | | | | | | | | | | | This is to prepare the move of rabbit_amqqueue to rabbitmq-server to solve a dependency of rabbitmq-common on rabbitmq-server. [#118490793] (cherry picked from commit be47cc4cd69e00d4de7c4c49f9e92dc53514532c)
* | Move rabbit_basic:maybe_gc_large_msg() and rabbit_basic:msg_size() to ↵Jean-Sébastien Pédron2017-06-261-1/+30
|/ | | | | | | | | | | | | rabbit_writer rabbit_basic still has function wrappers to avoid any API breakage. This is to prepare the move of rabbit_basic to rabbitmq-server to solve a dependency of rabbitmq-common on rabbitmq-server. [#118490793] (cherry picked from commit e6c9dcb697688b17ee0c0063d197f6ab19692958)
* (c) yearMichael Klishin2017-04-021-1/+1
|
* Use the new -spec formatJean-Sébastien Pédron2016-06-281-49/+41
| | | | | | | | | | | | | 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]
* Update (c) infoMichael Klishin2016-01-011-1/+1
|
* Initial import of rabbitmq-commonJean-Sébastien Pédron2015-06-221-0/+390