Skip to main content

republish

Republish message.

def republish(
producer: kombu.Producer,
message: kombu.Message,
exchange: string,
routing_key: string,
remove_props: list
)

Republish message.

Parameters

NameTypeDescription
producerkombu.ProducerThe producer instance used to publish the message.
messagekombu.MessageThe original message object to be republished.
exchangestringThe name of the exchange to publish to; defaults to the original message's exchange.
routing_keystringThe routing key to use; defaults to the original message's routing key.
remove_propslistA list of property keys to strip from the message before republishing; defaults to application headers, content type, encoding, and headers.

Returns

TypeDescription
Nothing is returned; the message is published to the specified exchange.