class LavinMQ::VHost

Included Modules

Defined in:

lavinmq/vhost.cr

Constant Summary

FEDERATION_UPSTREAM = "federation-upstream"
FEDERATION_UPSTREAM_SET = "federation-upstream-set"
Log = LavinMQ::Log.for("vhost")
SHOVEL = "shovel"

Constructors

Instance Method Summary

Macros inherited from module LavinMQ::Stats

rate_stats(stats_keys, log_keys = [] of ::String) rate_stats

Instance methods inherited from module LavinMQ::SortableJSON

details_tuple details_tuple, to_json(json : JSON::Builder) to_json

Constructor Detail

def self.new(name : String, server_data_dir : String, users : UserStore, replicator : Clustering::Replicator, description : String = "", tags : Array(String) = Array(String).new(0)) #

[View source]

Instance Method Detail

def ack_count : UInt64 #

def add_connection(client : Client) #

[View source]
def add_operator_policy(name : String, pattern : String, apply_to : String, definition : Hash(String, JSON::Any), priority : Int8) : OperatorPolicy #

[View source]
def add_parameter(p : Parameter) #

[View source]
def add_policy(name : String, pattern : String, apply_to : String, definition : Hash(String, JSON::Any), priority : Int8) : Policy #

[View source]
def apply(f, loading = false) : Bool #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def bind_exchange(destination, source, routing_key, arguments = AMQP::Table.new) #

[View source]
def bind_queue(destination, source, routing_key, arguments = AMQP::Table.new) #

[View source]
def channel_closed_count : UInt64 #

def channel_created_count : UInt64 #

def close(reason = "Broker shutdown") #

[View source]
def closed? : Bool #

[View source]
def confirm_count : UInt64 #

def connection_closed_count : UInt64 #

def connection_created_count : UInt64 #

def connections : Array(LavinMQ::Client) #

[View source]
def consumer_added_count : UInt64 #

def consumer_removed_count : UInt64 #

def current_stats_details #

Like stats_details but without log


[View source]
def data_dir : String #

[View source]
def declare_exchange(name, type, durable, auto_delete, internal = false, arguments = AMQP::Table.new) #

[View source]
def declare_queue(name, durable, auto_delete, arguments = AMQP::Table.new) #

[View source]
def delete #

[View source]
def delete_exchange(name) #

[View source]
def delete_operator_policy(name) #

[View source]
def delete_parameter(component_name, parameter_name) #

[View source]
def delete_policy(name) #

[View source]
def delete_queue(name) #

[View source]
def deliver_count : UInt64 #

def deliver_get_count : UInt64 #

def details_tuple #

[View source]
def dir : String #

[View source]
def direct_reply_consumers : Hash(String, LavinMQ::Client::Channel) #

[View source]
def event_tick(event_type) #

[View source]
def exchanges : Hash(String, LavinMQ::Exchange) #

[View source]
def flow=(flow : Bool) #

[View source]
def flow? : Bool #

[View source]
def get_count : UInt64 #

def inspect(io : IO) #
Description copied from class Reference

Appends 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>

[View source]
def max_connections : Int32 | Nil #

[View source]
def max_connections=(value : Int32) : Nil #

[View source]
def max_connections=(max_connections : Int32 | Nil) #

[View source]
def max_queues : Int32 | Nil #

[View source]
def max_queues=(value : Int32) : Nil #

[View source]
def max_queues=(max_queues : Int32 | Nil) #

[View source]
def message_details #

[View source]
def name : String #

[View source]

[View source]

[View source]

[View source]
def publish(msg : Message, immediate = false, visited = Set(Exchange).new, found_queues = Set(Queue).new) : Bool #

Queue#publish can raise RejectPublish which should trigger a Nack. All other confirm scenarios should be Acks, apart from Exceptions. As long as at least one queue reject the publish due to overflow a Nack should be sent, even if other queues accepts the message. Behaviour confirmed with RabbitMQ. True if it also succesfully wrote to one or more queues False if no queue was able to receive the message because they're closed The position of the msg.body_io should be at the start of the body When this method finishes, the position will be the same, start of the body


[View source]
def publish_count : UInt64 #

def queue_bindings(queue : Queue) : Iterator(BindingDetails) #

[View source]
def queue_declared_count : UInt64 #

def queue_deleted_count : UInt64 #

def queues : Hash(String, LavinMQ::Queue) #

[View source]
def redeliver_count : UInt64 #

def reject_count : UInt64 #

def rm_connection(client : Client) #

[View source]
def shovels #

[View source]
def stats_details #

[View source]
def stop_shovels #

[View source]
def stop_upstream_links #

[View source]
def sync : Nil #

[View source]
def unbind_exchange(destination, source, routing_key, arguments = AMQP::Table.new) #

[View source]
def unbind_queue(destination, source, routing_key, arguments = AMQP::Table.new) #

[View source]
def update_rates : Nil #

[View source]
def upstreams #

[View source]
def users : LavinMQ::UserStore #

[View source]