Skip to main content

Module codec

Module codec 

Source
Expand description

Pure mapping between Envelope and AMQP BasicProperties / headers.

Nothing here touches the broker, so every function can be unit-tested without a running RabbitMQ.

Constants§

CONTENT_TYPE_JSON
content-type set on every published message.
DELIVERY_MODE_PERSISTENT
delivery-mode for a persistent message.
REASON_MALFORMED
Reason recorded on bodies that could not be decoded as an Envelope.

Functions§

base_headers
Headers carried by every published envelope.
dead_letter_headers
Headers recorded on a message routed to q.dead.
dead_letter_props
AMQP properties for publishing envelope to its dead-letter queue.
malformed_props
AMQP properties for a body that could not be decoded as an Envelope.
props_for
AMQP properties for publishing envelope.