Skip to main content

config_get_message_routing_domain

Last updated March 2020

Name

config_get_message_routing_domain — Determine where to place a message

Synopsis

#include "hooks/core/config_get_message_routing_domain.h"

| int **core_config_get_message_routing_domain** ( | closure, |   | |   | cs, |   | |   | m, |   | |   | buff, |   | |   | len); |   |

void * <var class="pdparam">closure</var>; generic_module_infrastructure * <var class="pdparam">cs</var>; ec_message * <var class="pdparam">m</var>; char * <var class="pdparam">buff</var>; int <var class="pdparam">len</var>;

Description

This hook is called when the system needs to determine what domain to send a message to. It provides a way to set the gateway configuration directive at the per-message level.

This hook is called to determine which domain's queue messages should be placed in. The default queue is based on the result of config_get_binding_domain_gateway, but the queue can be overridden by registering a custom function at this hook. buff is supplied by the caller and is at least len bytes long. buff will be populated with the full gateway domain.

Parameters

closure

A pointer to the closure function.

cs

For a description of this data type see generic_module_infrastructure.

buff

The buffer for holding the routing domain.

len

The length of the buffer.

Return Values

This hook returns zero or 1. If non-zero, no further hook providers are called.

Threading

This hook will be called in any thread.

Was this page helpful?