class

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)
Source

Instance methods

ack(delivery_tag, batch = true)

Acknowledge a successfully shoveled message.

Source
delete_after
Source
each

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.

Source
pending_ack

The highest acked tag not yet acked to the broker, if any.

Source
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.

Source
start
Source
started?

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.

Source
stop
Source