Constants
DEAD_LETTER_KEYS = {"dead_lettered_delivery_limit_disabled", "dead_lettered_delivery_limit_at_most_once", "dead_lettered_expired_disabled", "dead_lettered_expired_at_most_once", "dead_lettered_maxlen_disabled", "dead_lettered_maxlen_at_most_once", "dead_lettered_rejected_disabled", "dead_lettered_rejected_at_most_once"}
FEDERATION_UPSTREAM = "federation-upstream"
FEDERATION_UPSTREAM_SET = "federation-upstream-set"
Log = LavinMQ::Log.for("vhost")
STATS_KEYS = {"channel_closed", "channel_created", "connection_closed", "connection_created", "queue_declared", "queue_deleted", "ack", "deliver", "deliver_no_ack", "deliver_get", "get", "get_no_ack", "publish", "confirm", "redeliver", "reject", "return_unroutable", "consumer_added", "consumer_removed", "recv_oct", "send_oct"}
Instance methods
add_connection(client : Client)
Sourceadd_parameter(p : Parameter, save = true, apply = true)
Sourceapply(f, loading = false, fsync = true) :
Bool Sourceapply_policies(resources :
Array(
Queue |
Exchange) |
Nil = nil)
Each policy change spawns its own run, and runs can overlap. Each run
takes a generation along with its snapshot of the policies, and a
resource skips a run older than the newest one it has applied, so a run
that read the policies before a later change can't overwrite that
change's run. No lock is held while applying: applying a policy can
take other locks, e.g. a delayed-message policy registers a queue.
Sourcebind_exchange(destination, source, routing_key, arguments = AMQP::Table.new, fsync = true)
Sourcebind_queue(destination, source, routing_key, arguments = AMQP::Table.new, fsync = true)
Sourceclose(reason = "Broker shutdown")
Sourceconnection_created_count
Sourceconnection_limit_reached?
Sourcecurrent_stats_details
Like stats_details but without log
Sourcedead_lettered_delivery_limit_at_most_once_count
Sourcedead_lettered_delivery_limit_disabled_count
Sourcedead_lettered_expired_at_most_once_count
Sourcedead_lettered_expired_disabled_count
Sourcedead_lettered_maxlen_at_most_once_count
Sourcedead_lettered_maxlen_disabled_count
Sourcedead_lettered_rejected_at_most_once_count
Sourcedead_lettered_rejected_disabled_count
Sourcedeclare_exchange(name, type, durable, auto_delete, internal = false, arguments = AMQP::Table.new, fsync = true)
Sourcedeclare_queue(name, durable, auto_delete, arguments = AMQP::Table.new, fsync = true)
Sourcedelete_operator_policy(name)
Sourcedelete_parameter(component_name, parameter_name)
Sourcedirect_reply_consumer?(consumer_tag :
String) :
Client::Channel |
Nil Sourcedirect_reply_consumer_delete(consumer_tag :
String) :
Client::Channel |
Nil Sourcedirect_reply_consumer_set(consumer_tag :
String, channel :
Client::Channel) :
Nil Sourceenqueue_ack(target :
Persister::ConfirmTarget, id :
UInt64)
Sourcefsync_definitions
Flush definitions written with fsync: false (e.g. during bulk import).
SourceAppends a String representation of this object
which includes its class name, its object address
and the values of all instance variables.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>
Sourcemqtt_subscription_tree
Routing index for MQTT publishes. Owned by the vhost so that it exists
before definitions replay; entries are sessions and x-mqtt-topic exchanges.
Sourcequeue_bindings(queue : Queue)
Sourceregister_exchange(exchange : Exchange) : Nil
Sourceregister_queue(queue : AMQP::Queue) : Nil
Sourcerm_connection(client : Client)
Sourcesave_policies!
Persist the policy/operator-policy/parameter stores; used to flush after a
bulk import that created entries with save: false.
Sourceunbind_exchange(destination, source, routing_key, arguments = AMQP::Table.new)
Sourceunbind_queue(destination, source, routing_key, arguments = AMQP::Table.new)
Source