{"id":18830191,"url":"https://github.com/gravitee-io/gravitee-exchange","last_synced_at":"2026-04-22T10:02:56.257Z","repository":{"id":229027073,"uuid":"733082687","full_name":"gravitee-io/gravitee-exchange","owner":"gravitee-io","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-16T15:49:52.000Z","size":1003,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-04-16T17:34:42.352Z","etag":null,"topics":["security-scan"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gravitee-io.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-18T14:21:52.000Z","updated_at":"2026-03-11T17:56:22.000Z","dependencies_parsed_at":"2024-07-22T13:56:08.786Z","dependency_job_id":"d8a079f3-bcee-4377-bf26-793250e7a522","html_url":"https://github.com/gravitee-io/gravitee-exchange","commit_stats":null,"previous_names":["gravitee-io/gravitee-exchange"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/gravitee-io/gravitee-exchange","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-exchange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-exchange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-exchange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-exchange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gravitee-io","download_url":"https://codeload.github.com/gravitee-io/gravitee-exchange/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gravitee-io%2Fgravitee-exchange/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32130776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["security-scan"],"created_at":"2024-11-08T01:48:06.170Z","updated_at":"2026-04-22T10:02:56.239Z","avatar_url":"https://github.com/gravitee-io.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Gravitee.io - Command-Reply Exchange Framework\n\n== Description\nThe command-reply exchange framework offers a generic mechanism to exchange commands and replies between two components called Controller and Connectors.\n\n== Overview\n=== Connector\nA connector is identified by its id and its target-id. In order to scale connectors, connectors can be attached to the same target-id. The connector is managed by a controller.\nA Connector allows to send command to the controller.\n\n=== Controller\nA controller is the component where connectors can connect to. It will manage connectors life-cycle based health check, and primary election. Controllers work in cluster based on ClusterManager service offered by https://github.com/gravitee-io/gravitee-node/tree/master/gravitee-node-cluster[gravitee-node].\nA controller allows to send commands and batches to a connector via its target-id.\n\n=== Channel\nA channel is a way to exchange commands and replies between a connector and a controller. There is always a connector view and a controller view of the same channel. A channel can be embedded when both controller and connectors run on the same JVM or could represent a network when they are remote.\n\n=== Commands\nA command is a json payload send to a channel. For any commands a reply is expected.\n\n=== Workflow\nBellow you could find advanced details on different connector\u003c\u003econtroller workflows.\n\n==== Registration\nThis is the first required step to allow connectors and controllers to exchange commands. The diagram bellow describes how a connector establishes the connection and how the controller registers it.\n\nimage::docs/registration.png[width=980]\n\n==== Primary channel election\nThe primary channel election is used in order to avoid cluster management on the connectors side. A channel get notified it is primary thanks to a specific command. Then, it can e.g. start a scheduled process to send the controller some specific commands. Note that primary and secondary channels can still be used to send and receive commands and replies, this mechanism exists so that a connector bound to the primary channel is responsible to send commands that no other connector is allowed to send.\n\nimage::docs/primary-channel-election.png[width=1167]\n\n==== Sending command\nA command is the way to communicate between a connector and a controller. The schema bellow explain the various steps its processing involves.\n\nimage::docs/sending-command.png[width=1125]\n\n==== Health check mechanism\nThe purpose of health check is to verify that the connector is still properly working and able to receive commands, at network level and also at the business logic level. The connector can do business check to ensure it can react on any commands.\n\nimage::docs/health-check.png[width=1125]\n\n== Management API\nBy default, when a controller is created it will register endpoints on the Node Management API. See https://github.com/gravitee-io/gravitee-node/blob/master/README.adoc#management.\n\nThe endpoints are the following, where `[identifier]` is optional and will be your controller identifier:\n\n    - `/exchange/[identifier]/targets`: return metrics information on channels and batchs grouped by target.\n    - `/exchange/[identifier]/targets/:id`: return metrics information on channels and batchs for the given target.\n    - `/exchange/[identifier]/targets/:id/channels`: return metrics information on channels for the given target.\n    - `/exchange/[identifier]/targets/:id/batchs`: return metrics information on batchs for the given target.\n    - `/exchange/[identifier]/batchs`: return metrics information on batchs. Can be filtered by `status` and `targetId`.\n    - `/exchange/[identifier]/batchs/:id`: return metrics information for the given batch.\n    - `/exchange/[identifier]/channels`: list channels. Can be filtered by `active` status and `targetId`.\n    - `/exchange/[identifier]/channels/:id`: return metrics information for the given channel.\n\n=== Deactivation\n\nThis behavior can be disabled by settings the following property `[identifier].controller.management.enabled` to `false`. The `[identifier]` is your controller identifier or `exchange` by default.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravitee-io%2Fgravitee-exchange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgravitee-io%2Fgravitee-exchange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgravitee-io%2Fgravitee-exchange/lists"}