{"id":13807583,"url":"https://github.com/atomix/atomix-vertx","last_synced_at":"2025-04-07T16:31:48.330Z","repository":{"id":77333485,"uuid":"43620332","full_name":"atomix/atomix-vertx","owner":"atomix","description":"Atomix Vert.x cluster manager.","archived":false,"fork":false,"pushed_at":"2018-11-27T19:19:27.000Z","size":95,"stargazers_count":25,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T05:05:11.586Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atomix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-10-04T00:52:19.000Z","updated_at":"2024-08-31T11:51:21.000Z","dependencies_parsed_at":"2023-07-24T21:17:05.765Z","dependency_job_id":null,"html_url":"https://github.com/atomix/atomix-vertx","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomix%2Fatomix-vertx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomix%2Fatomix-vertx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomix%2Fatomix-vertx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atomix%2Fatomix-vertx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atomix","download_url":"https://codeload.github.com/atomix/atomix-vertx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247687966,"owners_count":20979571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-04T01:01:27.238Z","updated_at":"2025-04-07T16:31:47.999Z","avatar_url":"https://github.com/atomix.png","language":"Java","funding_links":[],"categories":["Cluster Managers"],"sub_categories":[],"readme":"# Atomix Vert.x Cluster Manager\n\nThis project provides a cluster manager for [Vert.x](http://vertx.io) built on the [Atomix](http://atomix.io) distributed systems framework.\n\n### Installation\n\nAdd the Maven dependency to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.atomix.vertx\u003c/groupId\u003e\n  \u003cartifactId\u003eatomix-vertx\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Usage\n\nTo use the Atomix cluster manager, simply add the Atomix jar to your classpath. By default, when the Atomix cluster manager is loaded it will load the Atomix configuration from an `atomix.conf` file on the classpath.\n\n`atomix.conf`\n```\ncluster {\n  memberId: member-1\n  host: 192.168.10.2\n  port: 5679\n\n  multicast.enabled: true\n\n  discovery {\n    type: multicast\n    broadcastInterval: 1s\n  }\n\n  protocol {\n    type: swim\n    broadcastUpdates: true\n    probeInterval: 1s\n    failureTimeout: 5s\n  }\n}\n\nmanagementGroup {\n  type: raft\n  partitions: 1\n  members: [member-1, member-2, member-3]\n}\n\npartitionGroups.data {\n  type: primary-backup\n  partitions: 32\n}\n```\n\nA complete configuration reference can be found [on the website](https://atomix.io/docs/latest/user-manual/configuration/reference/).\n\n```java\nClusterManager clusterManager = new AtomixClusterManager();\n```\n\nYou can also provide a custom configuration file by passing the file name to the `AtomixClusterManager` constructor.\n\n```java\nClusterManager clusterManager = new AtomixClusterManager(\"my.conf\");\n```\n\nTo use the `AtomixClusterManager` programmatically, construct an `Atomix` instance and pass it to the constructor.\n\n```java\nAtomix atomix = Atomix.builder()\n  .withMemberId(\"member-1\")\n  .withHost(\"192.168.10.2\")\n  .withPort(5679)\n  .withMulticastEnabled()\n  .withMembershipProvider(MulticastDiscoveryProvider.builder()\n    .withBroadcastInterval(Duration.ofSeconds(1))\n    .build())\n  .withMembershipProtocol(SwimMembershipProtocol.builder()\n    .withBroadcastUpdates(true)\n    .withProbeInterval(Duration.ofSeconds(1))\n    .withFailureTimeout(Duration.ofSeconds(5))\n    .build())\n  .withManagementGroup(RaftPartitionGroup.builder()\n    .withNumPartitions(1)\n    .withMembers(\"member-1\", \"member-2\", \"member-3\")\n    .build())\n  .withPartitionGroups(PrimaryBackupPartitionGroup.builder(\"data\")\n    .withNumPartitions(32)\n    .build())\n  .build();\n\nClusterManager clusterManager = new AtomixClusterManager(atomix);\n```\n\nOnce the cluster manager has been constructed, configure Vert.x to use the Atomix cluster manager and start a clustered instance.\n\n```java\n// Configure the Vert.x cluster manager and create a new clustered Vert.x instance\nVertxOptions options = new VertxOptions().setClusterManager(manager);\nVertx.clusteredVertx(options, res -\u003e {\n  if (res.succeeded()) {\n    Vertx vertx = res.result();\n  } else {\n    // failed!\n  }\n});\n```\n\nSee the [Atomix website](http://atomix.io) for more information on configuring Atomix clusters.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomix%2Fatomix-vertx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatomix%2Fatomix-vertx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatomix%2Fatomix-vertx/lists"}