nchan_channel_id_split_delimiter

The `nchan_channel_id_split_delimiter` directive specifies the delimiter used to split channel IDs in Nchan's pub/sub messaging architecture.

Syntaxnchan_channel_id_split_delimiter string;
Defaultnone
Contextserver, location, if in location
Arguments1

Description

The nchan_channel_id_split_delimiter directive is a configuration option used within the Nchan module in NGINX to define a specific character or string that acts as a delimiter for splitting channel IDs. This is particularly useful when multiple channel IDs are included in a single request, allowing Nchan to correctly parse and separate these IDs for message handling. Depending on the use case, the delimiter can be any valid character, such as a comma, semicolon, or a specific string of characters, enabling flexible configurations based on application requirements.

By setting this directive, users ensure that Nchan appropriately splits the incoming channel ID strings during publishing and subscribing actions. This affects how messages are routed to the correct channels, enhancing the module's ability to manage multiple channels and ensuring that subscribers receive the correct messages based on the defined delimiter. This directive's behavior can be essential for applications that use compound channel IDs or require special handling of certain character sequences.

Config Example

location /pubsub {
    nchan_channel_id_split_delimiter "|";
    nchan_pubsub;
}

Make sure that the chosen delimiter does not conflict with the characters used in the channel IDs themselves, as this can lead to unexpected parsing issues.

When using multiple delimiters in a single configuration, ensure proper quoting and escaping to avoid syntax errors.

← Back to all directives