diff options
| author | Michael Klishin <michael@clojurewerkz.org> | 2016-06-05 02:18:36 +0300 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2016-06-05 02:18:36 +0300 |
| commit | 7e84bc3ae8be80157e8a42660d9c46db3f2c073b (patch) | |
| tree | 9a58ead382b7f62793d8eaa200e438903e52b3a7 /src | |
| parent | 1c3f4540969f22da3c9564e3c9de70f3b2fba240 (diff) | |
| parent | eb60bcfe5dec939d577fbde00b1a140031fb1d03 (diff) | |
| download | rabbitmq-server-git-7e84bc3ae8be80157e8a42660d9c46db3f2c073b.tar.gz | |
Merge branch 'stable'
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit.erl | 4 | ||||
| -rw-r--r-- | src/rabbit_amqqueue_process.erl | 34 |
2 files changed, 36 insertions, 2 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index b1f83729b8..d62a4b6935 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -507,6 +507,7 @@ await_startup(HaveSeenRabbitBoot) -> status() -> S1 = [{pid, list_to_integer(os:getpid())}, + %% The timeout value used is twice that of gen_server:call/2. {running_applications, rabbit_misc:which_applications()}, {os, os:type()}, {erlang_version, erlang:system_info(system_version)}, @@ -563,8 +564,9 @@ is_running() -> is_running(node()). is_running(Node) -> rabbit_nodes:is_process_running(Node, rabbit). environment() -> + %% The timeout value is twice that of gen_server:call/2. [{A, environment(A)} || - {A, _, _} <- lists:keysort(1, application:which_applications())]. + {A, _, _} <- lists:keysort(1, application:which_applications(10000))]. environment(App) -> Ignore = [default_pass, included_applications], diff --git a/src/rabbit_amqqueue_process.erl b/src/rabbit_amqqueue_process.erl index 2db86391a5..5535a84fca 100644 --- a/src/rabbit_amqqueue_process.erl +++ b/src/rabbit_amqqueue_process.erl @@ -33,28 +33,60 @@ prioritise_cast/3, prioritise_info/3, format_message_queue/2]). %% Queue's state --record(q, {q, +-record(q, { + %% an #amqqueue record + q, + %% none | {exclusive consumer channel PID, consumer tag} exclusive_consumer, + %% Set to true if a queue has ever had a consumer. + %% This is used to determine when to delete auto-delete queues. has_had_consumers, + %% backing queue module. + %% for mirrored queues, this will be rabbit_mirror_queue_master. + %% for non-priority and non-mirrored queues, rabbit_variable_queue. + %% see rabbit_backing_queue. backing_queue, + %% backing queue state. + %% see rabbit_backing_queue, rabbit_variable_queue. backing_queue_state, + %% consumers state, see rabbit_queue_consumers consumers, + %% queue expiration value expires, + %% timer used to periodically sync (flush) queue index sync_timer_ref, + %% timer used to update ingress/egress rates and queue RAM duration target rate_timer_ref, + %% timer used to clean up this queue due to TTL (on when unused) expiry_timer_ref, + %% stats emission timer stats_timer, + %% maps message IDs to {channel pid, MsgSeqNo} + %% pairs msg_id_to_channel, + %% message TTL value ttl, + %% timer used to delete expired messages ttl_timer_ref, ttl_timer_expiry, + %% Keeps track of channels that publish to this queue. + %% When channel process goes down, queues have to perform + %% certain cleanup. senders, + %% dead letter exchange as a #resource record, if any dlx, dlx_routing_key, + %% max length in messages, if configured max_length, + %% max length in bytes, if configured max_bytes, args_policy_version, + %% used to discard outdated/superseded policy updates, + %% e.g. when policies are applied concurrently. See + %% https://github.com/rabbitmq/rabbitmq-server/issues/803 for one + %% example. mirroring_policy_version = 0, + %% running | flow | idle status }). |
