class

LavinMQ::MQTT::Session

Inherits LavinMQ::MQTT::Subscriber < LavinMQ::AMQP::QueueStats < LavinMQ::Stats < LavinMQ::PolicyTarget < LavinMQ::SortableJSON < Reference < Object

Constants

ARGUMENTS = AMQP::Table.new({"x-queue-type" => "mqtt"})
EFFECTIVE_ARGS = {"x-queue-type"}
Log = ::LavinMQ::Log.for("mqtt.session")

Instance methods

ack(packet : Protocol::PubAck) : Nil
Source
ack_count
after_policy_applied

This can be overriden if the child class needs to do something after a policy has been applied.

Source
arguments
Source
auto_delete?
Source
bindings
Source
build_packet(env, packet_id) : Protocol::Publish
Source
clean_session?
Source
client
Source
client=(client : MQTT::Client | Nil)
Source
close
Source
closed?
Source
confirm_count
consumer_count
Source
current_stats_details

Like stats_details but without log

dedup_count
delete
Source
deliver(msg : Message, filter : String, ctx : PublishContext) : Bool

Called once per matching filter when an MQTT message is published. ctx is the publishing client's scratch state, reset per publish, so a subscriber matched by several filters can tell the calls apart from a new publish. Returns true if the message was accepted by at least one receiver.

Source
deliver_count
deliver_get_count
deliver_no_ack_count
details_tuple
Source
durable?
Source
exclusive?
Source
get_count
get_no_ack_count
in_use?
Source
internal?
Source
match?(durable, exclusive, auto_delete, arguments) : Bool
Source
message_count
Source
message_count_log
name
Source
pause!
Source
publish(msg : Message) : Bool

Returns whether the message was accepted, so the exchange only counts deliveries that happened.

Source
publish_count
purge(max_count : Int = UInt32::MAX) : UInt32
Source
redeliver_count
reject_count
restart!
Source
resume!
Source
return_unroutable_count
state
Source
state_match?(states : Array(QueueState)) : Bool
Source
stats_details
subscribe(tf, qos) : Bool

A concurrent API deletion can make the bind fail. TODO: Check session identity under the definitions lock before binding.

Source
to_json(json : JSON::Builder, consumer_limit : Int32 = -1)
Source
unacked_count_log
unacked_messages
Source
unsubscribe(tf)
Source
update_rates
vhost
Source

Nested types