class LavinMQ::Federation::Upstream

Defined in:

lavinmq/federation/link.cr
lavinmq/federation/upstream.cr

Constant Summary

DEFAULT_ACK_MODE = AckMode::OnConfirm
DEFAULT_EXPIRES = nil
DEFAULT_MAX_HOPS = 1_i64
DEFAULT_MSG_TTL = nil
DEFAULT_PREFETCH = 1000_u16
DEFAULT_RECONNECT_DELAY = 1

Constructors

Instance Method Summary

Constructor Detail

def self.new(vhost : VHost, name : String, raw_uri : String, exchange : Nil | String = nil, queue : Nil | String = nil, ack_mode : LavinMQ::Federation::AckMode = DEFAULT_ACK_MODE, expires : Int64 | Nil = DEFAULT_EXPIRES, max_hops : Int64 = DEFAULT_MAX_HOPS, msg_ttl : Int64 | Nil = DEFAULT_MSG_TTL, prefetch : UInt16 = DEFAULT_PREFETCH, reconnect_delay : Int32 = DEFAULT_RECONNECT_DELAY, consumer_tag = nil) #

[View source]

Instance Method Detail


[View source]
def ack_mode=(ack_mode : LavinMQ::Federation::AckMode) #

[View source]
def close #

[View source]
def consumer_tag : String #

[View source]
def exchange : String? #

[View source]
def exchange=(exchange : Nil | String) #

[View source]
def expires : Int64? #

[View source]
def expires=(expires : Int64 | Nil) #

[View source]
def link(federated_exchange : Exchange) : ExchangeLink #

declare queue on upstream consume queue and publish to downstream exchange declare upstream exchange (passive) declare x-federation-upstream exchange on upstream bind x-federation-upstream exchange to queue get bindings for downstream exchange add bindings from upstream exchange to x-federation-upstream exchange keep downstream exchange bindings reflected on x-federation-upstream exchange


[View source]
def link(federated_q : Queue) : QueueLink #

When federated_q has a consumer the connections are estabished. If all consumers disconnect, the connections are closed. When the policy or the upstream is removed the link is also removed.


[View source]
def links : Array(Link) #

[View source]
def log #

[View source]
def max_hops : Int64 #

[View source]
def max_hops=(max_hops : Int64) #

[View source]
def msg_ttl : Int64? #

[View source]
def msg_ttl=(msg_ttl : Int64 | Nil) #

[View source]
def name : String #

[View source]
def prefetch : UInt16 #

[View source]
def prefetch=(prefetch : UInt16) #

[View source]
def queue : String? #

[View source]
def queue=(queue : Nil | String) #

[View source]
def reconnect_delay : Int32 #

[View source]
def reconnect_delay=(reconnect_delay : Int32) #

[View source]
def stop_link(federated_exchange : Exchange) #

delete x-federation-upstream exchange on upstream delete queue on upstream


[View source]
def stop_link(federated_q : Queue) #

[View source]
def type #

[View source]
def uri : URI #

[View source]
def uri=(uri : URI) #

[View source]
def vhost : LavinMQ::VHost #

[View source]