Skip to main content

get_exchange

Get exchange used for sending events.

def get_exchange(
conn: kombu.Connection,
name: string = EVENT_EXCHANGE_NAME
) - > kombu.Exchange

Get exchange used for sending events.

Parameters

NameTypeDescription
connkombu.ConnectionConnection used for sending/receiving events; used to determine if the transport requires a fanout exchange type.
namestring = EVENT_EXCHANGE_NAMEThe name of the exchange to be returned.

Returns

TypeDescription
kombu.ExchangeA copy of the event exchange configured with the appropriate name and transport type (topic or fanout).