Register producer, consumer, view and clock-server with the given
integer timeout in seconds to keep the connection alive. Defaults
0.

prefetch_count (optional)

AMQP channel prefetch count limit, defaults to 0 for no limit.

amqp-consuming-server

connectin_id

The name of a global utility providing configured IBrokerConnection. A
consuming server will serve consumers registered for its connection id
only.

scheme (optional)

Configure URL schema for virtual rewriting using VirtualHostMonster,
default is http. Will be ignored if no hostname is given.

hostname (optional)

Hostname which will be passed into fake request. When calling
object.absolute_url() in a consuming server you’ll receive this
hostname. URL will be rewritten using VirtualHostMonster using following
scheme:

If a hostname is configured, VirtualHostMonster will be invoked,
socket.gethostname() will be used else.

port (optional)

Configure port for virtual rewriting using VirtualHostMonster,
default is 80. Will be ignored if no hostname is given.

use_vhm (optional)

Create VirtualHostMonster-wrapped method calls when hostname is set. VHM
is used to tell portal the configured real public hostname and to hide
portal’s id from path. Defaults to on when hostname is given.

site_id

The id of a site, which should be the context when consuming the AMQP
messages, which the consumers of a consuming server consume. If a
hostname is given, this will be used for VirtualHostMonster
rewrites.

user_id (optional)

Optional user id of the Plone user, whose privileges are used to consume
the messages. By default, the messages are consumed as Anonymous User
calling trusted filesystem code.

Changelog

0.11.0 (2013-06-05)

Set use_vhm=False for ZAMQP Test Layer
[saily]

Add option use_vhm to make VHM-methods optional (to allow use of
hostname=localhost:8080/Plone in development)
[Asko Soukka]

Added a configureable scheme, hostname and port keyword to be passed into
fake request object in consumers. We well automatically rewrite those URLs
using VirtualHostMonster.
[saily]

0.9.1 (2012-09-18)

Fixed to not set correlation_id-property for message if the given
correlation_id is None.

0.9.0 (2012-09-17)

Added alias ‘Producer.register’ for VTM._register.

Renamed ‘connected’-property to ‘is_connect’.

0.8.1 (2012-09-06)

Fixed queue length helpers to use BlockingChannel-helper properly.

0.8.0 (2012-09-06)

Fixed consumers without marker interface not to start consuming.

Enhanced undolog for transactions by ‘zamqp-consumer’-view.

Fixed consuming view to annotate transaction with the user configured for the
current consuming service.

Added separate auto_delete-setting for exchanges and queues. Previously
auto_delete was set as negation of durability, which remains the default.

Added connection configuration to default with implicit default producer
registration (= producer with the same name/id as the connection, but no any
special routing).

Added support for custom ‘x-cookie-auth’ header. Its value will be set to
value of ‘__ac’ cookie for AMQP request to allow PAS-authentication for
logged in user (e.g. to support authenticated asyncronous tasks).

Added __len__ for consumer and producer for getting the queue length (if the
related queue is defined) using blocking channel.

Added BlockingChannel wrapper to be used with ‘with’ statement to create
separate blocking connections for quick raw AMQP-operations.

Fixed to never declare queue starting with ‘amq.’, which is reserved prefix
in RabbitMQ. Allow empty queue names to support automatic (broker-generated)
queue-names.

Fixed to never declare RabbitMQ default exchanges (declarig of any
‘amq.’-starting exchange will be skipped).

Added json-serializer (when either json or simplejson can be imported).