NATS C Client with JetStream and Streaming support: microGroup

NATS C Client with JetStream and Streaming support 3.10.0 The nats.io C Client, Supported by Synadia Communications Inc.

Loading...
Searching...
No Matches
Functions
microGroup
- Microservices » Functions

## Functions
NATS_EXTERN microError * | microGroup_AddGroup (microGroup **new_group, microGroup *parent, microGroupConfig *config)
| Adds a sub-group to microGroup.
NATS_EXTERN microError * | microGroup_AddEndpoint (microGroup *g, microEndpointConfig *config)
| Adds an endpoint to a microGroup and starts listening for messages.

## Detailed Description

Functions that operate with microGroup.

## Function Documentation

## ◆ microGroup_AddGroup()

NATS_EXTERN microError * microGroup_AddGroup | ( | microGroup ** | new_group,
|  | microGroup * | parent,
|  | microGroupConfig * | config
| ) |  |

The new subgroup will be prefixed as "parent_prefix.prefix.". Groups are associated with a service, and are destroyed when the service is destroyed.

Parameters

  new_group | the location where to store the pointer to the new microGroup object.
  parent | the microGroup that the new group will be added to.
  config | group parameters.

Returns
  a microError if an error occurred.

See also
  microGroup_AddGroup, microGroup_AddEndpoint

## ◆ microGroup_AddEndpoint()

NATS_EXTERN microError * microGroup_AddEndpoint | ( | microGroup * | g,
|  | microEndpointConfig * | config
| ) |  |

This is a convenience method to add an endpoint with its `Subject` and `Name` prefixed with the group's prefix.

Parameters

  g | the microGroup that the endpoint will be added to.
  config | a microEndpointConfig object with the configuration of the endpoint. See micro_endpoint_config_s for descriptions of the fields.

Returns
  a microError if an error occurred.

See also
  microService_Destroy, microService_AddEndpoint, microEndpointConfig