Skip to content

v1.11.0

Compare
Choose a tag to compare
@aricart aricart released this 18 Jan 17:24
· 481 commits to main since this release
6368661

What's Changed

This release further enhances the beta/experimental service API feature and introduces the capability of hosting multiple endpoints in a single service. This means that stats and schema reporting are now specific to an endpoint, but collected for the entire service on a stats or schema request.

To add an endpoint, addEndpoint() is used. This call takes a simple name, an optional callback (or the return value is an iterator) or a set of options with an optional subject, handler and schema. The name provided to the endpoint is stored and can be used to identify stats collected for the endpoint. By default addEndpoint() on the service adds to an empty group, so the subjects would be flat (not grouped).

To group endpoints in a common subject root, use addGroup() which allows you to specify a subject to be used as prefix. You can endpoints or groups to a group. The full chain of the group to the endpoint determines the subject where the endpoint listens.

Other changes

  • [CHANGE] [SRV] the endpoint configuration in the service is now optional - if specified, the endpoint is added as the default endpoint, but listening on the specified subject. The endpoint configuration now also houses the schema details for the endpoint.
  • [FEAT] [SRV] responses to monitoring/discovery have a type
  • [CHANGE] [SRV] stats and schema, are now per endpoint endpoints in the service's response
  • [FEAT] [SRV] schema now has an api_url field that can be set to any URL where the service developer wants to store/reference documentation. Each endpoint can report its own schema (specified during add or as part of endpoint configuration) under schema

Full Changelog: v1.10.3...v1.11.0