{"id":13808114,"url":"https://github.com/gchauvet/vertx-async","last_synced_at":"2025-10-23T15:30:31.082Z","repository":{"id":43223461,"uuid":"60347436","full_name":"gchauvet/vertx-async","owner":"gchauvet","description":":construction: Async helpers for Vert.x","archived":false,"fork":false,"pushed_at":"2022-03-12T07:34:27.000Z","size":391,"stargazers_count":12,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-30T19:11:17.916Z","etag":null,"topics":["async","library","vertx"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"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/gchauvet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-03T12:53:22.000Z","updated_at":"2023-04-12T07:32:03.000Z","dependencies_parsed_at":"2022-07-23T10:46:30.635Z","dependency_job_id":null,"html_url":"https://github.com/gchauvet/vertx-async","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fvertx-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fvertx-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fvertx-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchauvet%2Fvertx-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gchauvet","download_url":"https://codeload.github.com/gchauvet/vertx-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237843854,"owners_count":19375216,"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":["async","library","vertx"],"created_at":"2024-08-04T01:01:35.389Z","updated_at":"2025-10-23T15:30:30.662Z","avatar_url":"https://github.com/gchauvet.png","language":"Java","funding_links":[],"categories":["Utilities"],"sub_categories":[],"readme":"# vertx-async\n[![Build Status via Travis CI](https://travis-ci.org/gchauvet/vertx-async.svg?branch=master)](https://travis-ci.org/gchauvet/vertx-async)\n[![Coverage Status](https://coveralls.io/repos/github/gchauvet/vertx-async/badge.svg?branch=master)](https://coveralls.io/github/gchauvet/vertx-async?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/8d5ba040f44c44c48d6af3639a5aef35)](https://www.codacy.com/app/gchauvet/vertx-async?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=gchauvet/vertx-async\u0026amp;utm_campaign=Badge_Grade)\n[![Dependency Status](https://www.versioneye.com/user/projects/576e250f7bc681003c4900b1/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/576e250f7bc681003c4900b1)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.zatarox/vertx-async/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.zatarox/vertx-async)\n\nvertx-async is a portage of caolan/async nodejs module to [Vert.x](http://vertx.io/) framework that provides helpers methods for common async patterns.\n\nAsync provides many methods that include the usual 'functional' suspects (`map`, `reduce`, `filter`, `each`…) as well as some common patterns for asynchronous control flow (`parallel`, `series`, `waterfall`…). All these functions assume you follow the  [vert.x convention](http://vertx.io/docs/vertx-core/java/#_don_t_call_us_we_ll_call_you).\n\n\u003cp align=\"center\"\u003e\n\u003cimg style=\"width:100%\" src=\"https://i.chzbgr.com/full/5068754944/hBECA40C8\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\nvertx-async is available on maven central repository and OSSRH repository.\n\n## Quick Examples\n\n### Each\n\n#### On a collection\n```java\n    @Override\n    public void start(final Future\u003cVoid\u003e startFuture) {\n        AsyncFactorySingleton.getInstance().createCollections(context)\n        .each(IntStream.iterate(0, i -\u003e i + 1).limit(100).boxed().collect(Collectors.toList()), (item, handler) -\u003e {\n            System.out.println(\"get \" + item);\n            handler.handle(DefaultAsyncResult.succeed());\n        }, e -\u003e {\n            System.out.println(\"done.\");\n            startFuture.complete(e.result());\n        });\n    }\n```\n\n#### On a map\n```java\n    @Override\n    public void start(final Future\u003cVoid\u003e startFuture) {\n        AsyncFactorySingleton.getInstance().createCollections(context)\n        .each(IntStream.iterate(0, i -\u003e i + 1).limit(100).boxed().collect(Collectors.toMap(p -\u003e p.toString(), Function.identity())), (item, handler) -\u003e {\n            System.out.println(item.getKey() + \" -\u003e \" + item.getValue());\n            handler.handle(DefaultAsyncResult.succeed());\n        }, e -\u003e {\n            System.out.println(\"done.\");\n            startFuture.complete(e.result());\n        });\n    }\n```\n\nThere are many more functions available so take a look at the wiki for a full list (work in progress) . This README aims to be comprehensive, so if you feel anything is missing please create a GitHub issue for it.\n\n### Multiple callbacks\n\nMake sure to always calling the callback handler once, instead of a `return` procedural programming statement style, otherwise you will cause multiple callbacks and unpredictable behavior in many cases.\n\n## Documentation\n\nSee our wiki (:construction:).\n\n### Collections\n|   |   |   |   |   |   |   |   |   |   |   |\n|---|---|---|---|---|---|---|---|---|---|---|\n| each  | map  | filter  | reject  | reduce  | transform  | detect  | sort  | some  | every  | concat |\n\n### Control Flow\n|   |   |   |   |   |   |   |   |\n|---|---|---|---|---|---|---|---|\n| series  | parallel  | whilst  | until  | during | forever  | waterfall  | seq |\n| retry | queue | applyEach (each) | times | race | cargo |  |  |\n\n# Utils\n|   |   |   |   |   |   |   |   |\n|---|---|---|---|---|---|---|---|\n| asyncify | constant | memoize | timeout |   |   |   |   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgchauvet%2Fvertx-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgchauvet%2Fvertx-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgchauvet%2Fvertx-async/lists"}