LavinMQ::Shovel::AMQPSource
Inherits LavinMQ::Shovel::Source < Reference < Object
Constants
Log = LavinMQ::Log.for("amqp_source")
Constructors
new(name : String, uris : Array(URI), queue : String | Nil, exchange : String | Nil = nil, exchange_key : String | Nil = nil, delete_after : LavinMQ::Shovel::DeleteAfter = DEFAULT_DELETE_AFTER, prefetch : UInt16 = DEFAULT_PREFETCH, ack_mode : LavinMQ::Shovel::AckMode = DEFAULT_ACK_MODE, consumer_args : Hash(String, JSON::Any) | Nil = nil, direct_user : Auth::User | Nil = nil, batch_ack_timeout : Time::Span = DEFAULT_BATCH_ACK_TIMEOUT)
SourceInstance methods
delete_after
Sourceeach
Queue-length mode moves as many messages as were on the queue at start (the message_count snapshot) and then finishes. Requeued messages come back and count when settled; a message published after the start may be delivered into a slot a settled one freed and is moved like any other — nothing delivered is ever left unacked.
reject(delivery_tag, requeue)
Return a single message to the source. A reject settles its tag at the broker, so the frontier moves over it and a later cumulative ack is free to pass it.
start
Sourcestarted?
True while the source can settle deliveries. Outcomes that arrive for a stopped source (confirms voided by a destination close during pause or terminate) have nothing to act on and are ignored by the Runner.
stop
Source