{"id":19233337,"url":"https://github.com/hoangtien2k3/reactor-core","last_synced_at":"2025-08-13T22:04:20.210Z","repository":{"id":244616313,"uuid":"815018997","full_name":"hoangtien2k3/reactor-core","owner":"hoangtien2k3","description":"Reactive programming with Project reactor-core","archived":false,"fork":false,"pushed_at":"2024-06-17T16:50:28.000Z","size":54,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T11:42:18.892Z","etag":null,"topics":["functional-programming","reactive-programming","reactor-core","spring","webflux"],"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/hoangtien2k3.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T07:18:02.000Z","updated_at":"2024-06-17T16:50:31.000Z","dependencies_parsed_at":"2024-06-16T05:40:19.081Z","dependency_job_id":"27972669-cf16-4f53-beee-5ec217854079","html_url":"https://github.com/hoangtien2k3/reactor-core","commit_stats":null,"previous_names":["hoangtien2k3/reactor-core"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hoangtien2k3/reactor-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangtien2k3%2Freactor-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangtien2k3%2Freactor-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangtien2k3%2Freactor-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangtien2k3%2Freactor-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoangtien2k3","download_url":"https://codeload.github.com/hoangtien2k3/reactor-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoangtien2k3%2Freactor-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270323579,"owners_count":24564684,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["functional-programming","reactive-programming","reactor-core","spring","webflux"],"created_at":"2024-11-09T16:10:13.017Z","updated_at":"2025-08-13T22:04:19.974Z","avatar_url":"https://github.com/hoangtien2k3.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## REACTOR-CORE IN JAVA\n\nDocs: https://projectreactor.io/docs/core/release/reference/\n\nFlux:\n\n- [https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html](https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html)\n\nMono:\n\n- [https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html](https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html)\n\n## Reactor Core:\n\n## ❄️Publisher\n\n- Publisher là một nguồn dữ liệu mà từ đó các phần tử dữ liệu (items) được phát ra. Nó định nghĩa một phương thức duy\n  nhất:\n\n```java\npublic interface Publisher\u003cT\u003e {\n    void subscribe(Subscriber\u003c? super T\u003e s);\n}\n```\n\n## ❄️Subscriber:\n\n- Subscriber là một người tiêu dùng dữ liệu, nó sẽ nhận các phần tử dữ liệu từ Publisher thông qua phương thức onNext().\n\n```java\npublic interface Subscriber\u003cT\u003e {\n    void onSubscribe(Subscription s);\n\n    void onNext(T t);\n\n    void onError(Throwable t);\n\n    void onComplete();\n}\n```\n\nTrong đó:\n\n- [onSubscribe(Subscription s)](): Được gọi khi Subscriber đăng ký vào Publisher. Subscriber sử dụng đối tượng\n  Subscription để yêu cầu hoặc hủy nhận dữ liệu.\n- [onNext(T t)](): Được gọi để xử lý mỗi phần tử dữ liệu được phát ra.\n- [onError(Throwable t)](): Được gọi khi xảy ra lỗi trong quá trình phát dữ liệu.\n- [onComplete()](): Được gọi khi Publisher đã phát ra tất cả các phần tử và hoàn thành.\n\n## ❄️Subscription:\n\n- Subscription đại diện cho mối quan hệ giữa Publisher và Subscriber. Nó cung cấp hai phương thức chính:\n\n```java\npublic interface Subscription {\n    void request(long n);\n\n    void cancel();\n}\n```\n\nTrong đó:\n\n- [request(long n)](): Yêu cầu Publisher phát ra n phần tử tiếp theo cho Subscriber.\n- [cancel()](): Hủy đăng ký, không nhận thêm dữ liệu nữa.\n\n## ❄️Processor:\n\n- Processor là một thành phần trung gian, vừa là Publisher vừa là Subscriber. Nó có thể được sử dụng để xử lý dữ liệu\n  giữa nguồn dữ liệu ban đầu và người tiêu thụ.\n\n```java\npublic interface Processor\u003cT, R\u003e extends Subscriber\u003cT\u003e, Publisher\u003cR\u003e {\n}\n```\n\n## Ví dụ về Dòng Chảy của Dữ Liệu:\n\n- [Publisher]() tạo ra dữ liệu.\n- [Subscriber]() đăng ký (subscribe) vào Publisher.\n- [Publisher]() gửi một Subscription tới Subscriber thông qua phương thức onSubscribe.\n- [Subscriber]() yêu cầu dữ liệu từ Publisher bằng cách gọi request trên Subscription.\n- [Publisher]() gửi dữ liệu tới Subscriber qua phương thức onNext.\n- `Khi tất cả dữ liệu đã được gửi`, Publisher gọi onComplete để báo hiệu kết thúc.\n- `Nếu có lỗi xảy ra`, Publisher gọi onError.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoangtien2k3%2Freactor-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoangtien2k3%2Freactor-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoangtien2k3%2Freactor-core/lists"}