Class Puppet::Indirector::Queue
In: lib/puppet/indirector/queue.rb
Parent: Puppet::Indirector::Terminus

Implements the :queue abstract indirector terminus type, for storing model instances to a message queue, presumably for the purpose of out-of-process handling of changes related to the model.

Relies upon Puppet::Util::Queue for registry and client object management, and specifies a default queue type of :stomp, appropriate for use with a variety of message brokers.

It‘s up to the queue client type to instantiate itself correctly based on Puppet configuration information.

A single queue client is maintained for the abstract terminus, meaning that you can only use one type of queue client, one message broker solution, etc., with the indirection mechanism.

Per-indirection queues are assumed, based on the indirection name. If the :catalog indirection makes use of this :queue terminus, queue operations work against the "catalog" queue. It is up to the queue client library to handle queue creation as necessary (for a number of popular queuing solutions, queue creation is automatic and not a concern).

Methods

client   find   intern   new   queue   queue   save   subscribe  

Included Modules

Puppet::Util

Public Class methods

converts the message from deserialized format to an actual model instance.

Provides queue subscription functionality; for a given indirection, use this method on the terminus to subscribe to the indirection-specific queue. Your block will be executed per new indirection model received from the queue, with obj being the model instance.

Public Instance methods

Returns the singleton queue client object.

Queue has no idiomatic "find"

Place the request on the queue

[Validate]