expand_dest
Expands the destination by attempting to unpack the return value into an exchange and routing key, falling back to the provided defaults if unpacking fails.
def expand_dest(
ret: any,
exchange: string,
routing_key: string
) - > tuple
Determines the final exchange and routing key by attempting to unpack a return value or falling back to provided defaults.
Parameters
| Name | Type | Description |
|---|---|---|
| ret | any | The primary source for destination details, expected to be an unpackable sequence of (exchange, routing_key). |
| exchange | string | The default exchange name to use if the ret parameter cannot be unpacked. |
| routing_key | string | The default routing key to use if the ret parameter cannot be unpacked. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the resolved exchange name and routing key string. |