{"id":15403660,"url":"https://github.com/rogervinas/apache-camel-fun","last_synced_at":"2026-02-27T00:01:21.663Z","repository":{"id":115435363,"uuid":"121349588","full_name":"rogervinas/apache-camel-fun","owner":"rogervinas","description":"🐫 Fun with Apache Camel","archived":false,"fork":false,"pushed_at":"2025-03-10T19:25:20.000Z","size":190,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-05T04:21:46.801Z","etag":null,"topics":["apache-camel"],"latest_commit_sha":null,"homepage":"","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/rogervinas.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,"zenodo":null}},"created_at":"2018-02-13T06:59:18.000Z","updated_at":"2025-03-10T19:25:17.000Z","dependencies_parsed_at":"2025-05-17T17:33:05.582Z","dependency_job_id":"50857ccf-b722-43d9-a686-d9ee9d05a2b7","html_url":"https://github.com/rogervinas/apache-camel-fun","commit_stats":{"total_commits":13,"total_committers":2,"mean_commits":6.5,"dds":0.07692307692307687,"last_synced_commit":"66e1a30de9e1b952a097d1b7a6d8276a352b8408"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rogervinas/apache-camel-fun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogervinas%2Fapache-camel-fun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogervinas%2Fapache-camel-fun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogervinas%2Fapache-camel-fun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogervinas%2Fapache-camel-fun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogervinas","download_url":"https://codeload.github.com/rogervinas/apache-camel-fun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogervinas%2Fapache-camel-fun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29878266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["apache-camel"],"created_at":"2024-10-01T16:09:33.261Z","updated_at":"2026-02-27T00:01:21.640Z","avatar_url":"https://github.com/rogervinas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fun with Apache Camel\n\n![fun-with-apache-camel](etc/fun-with-apache-camel.jpg)\n\n## Before Having Fun\n\nWhat is Camel? *- Jonathan Anstey at [DZone](https://dzone.com/articles/open-source-integration-apache)*\n\nApache Camel is an open source Java framework that focuses on making integration easier and more accessible to developers. It does this by providing:\n\n* Concrete implementations of all the widely used EIPs.\n* Connectivity to a great variety of transports and APIs.\n* Easy to use Domain Specific Languages (DSLs) to wire EIPs and transports together.\n\nAll is about Routes, Components and Exchanges:\n\n* Routes:\n  * A route defines the workflow an Exchange will have to follow.\n  * A route starts using a Component consumer (the **from**) and then can apply any set of EIP's and invoke any set of Component producers (usually the **to**'s).\n\n* Components:\n  * A Component may provide two implementations: a Consumer and a Producer.\n  * A Component consumer is placed at the **from** of a route and generates Exchanges every time its own logic is triggered, usually receiving data from an external source.\n  * A Component producer is placed at a **to** endpoint and usually sends the Exchange to an external sink.\n\n* Exchanges:\n  * An Exchange is the data flowing across a route, containing:\n    * An **in** message: a body (anything) and some headers (list of key+value)\n    * An **out** message: a body (anything) and some headers (list of key+value)\n    * Properties: a list of key+value only set/get by us and available along the route.\n  * At any step of a route the **in** message is transformed to an **out** message which will be the **in** message for the following step.\n  * Type converters will automatically convert a body to whatever type we want to read it as.\n\nUseful links:\n\n* [What is Camel](http://camel.apache.org/what-is-camel.html)\n* [Integration patterns](http://camel.apache.org/enterprise-integration-patterns.html)\n* [Components](http://camel.apache.org/components.html)\n* [Languages](http://camel.apache.org/languages.html)\n* [Type Converters](http://camel.apache.org/type-converter.html)\n* [Error handling](http://camel.apache.org/error-handling-in-camel.html)\n* [Testing](http://camel.apache.org/testing.html)\n* [Examples](https://github.com/apache/camel/tree/master/examples)\n* [Source Code](https://github.com/apache/camel/tree/master)\n\n## Fun Use Case #1\n\n![apache-camel-fun-1](etc/apache-camel-fun-1.png)\n\n* An external system periodically creates files in a local directory.\n* The external system sends them ZIP compressed.\n* The original content is XML:\n\n```xml\n\u003cUserQuotes\u003e\n  \u003cUserQuote Id=\"nnn\" Name=\"xxx\" Surname=\"yyy\"\u003e\n    \u003cQuote\u003ezzzzzz\u003c/Quote\u003e\n  \u003c/UserQuote\u003e\n  \u003cUserQuote/\u003e\n  \u003cUserQuote/\u003e\n\u003c/UserQuotes\u003e\n```\n\n* Generate one JSON for each UserQuote:\n\n```javascript\n{ \"id\" : nnn, \"user\" : \"xxx yyy\", \"quote\" : \"zzzzzz\" }\n```\n\n* Send it both to an FTP server and to a KAFKA topic.\n\n## Fun Use Case #2\n\n![apache-camel-fun-2](etc/apache-camel-fun-2.png)\n\n* Receive messages published to KAFKA by [Fun Use Case #1](#fun-use-case-1).\n* Send them to an AWS-S3 bucket if the id is even.\n* Send them to a POSTGRES table if the id is odd.\n\n## Fun Use Case #3\n\n![apache-camel-fun-3](etc/apache-camel-fun-3.png)\n\n* Poll POSTGRES table rows inserted by [Fun Use Case #2](#fun-use-case-2).\n* Aggregate them in groups of 5.\n* Convert each group to a CSV file.\n* Send the file to an email address.\n\n## Fun Use Case #4\n\n![apache-camel-fun-4](etc/apache-camel-fun-4.png)\n\n* Poll files uploaded to:\n  * an FTP server by [Fun Use Case #1](#fun-use-case-1).\n  * an AWS-S3 bucket by [Fun Use Case #2](#fun-use-case-2).\n* Enrich them executing a query to a POSTGRES table.\n* Convert to a line of text and append to a file in a local directory.\n\n## Let the Fun Begin\n\n### Code!\n\nMake all the test pass!\n\n```bash\n./gradlew test --info\n./gradlew integrationTest --info\n```\n\n### Run!\n\nStart all servers and applications:\n\n```bash\ndocker-compose up\ncd apache-camel-fun-1 ; ./gradlew bootRun\ncd apache-camel-fun-2 ; ./gradlew bootRun\ncd apache-camel-fun-3 ; ./gradlew bootRun\ncd apache-camel-fun-4 ; ./gradlew bootRun\n```\n\n... and test manually:\n\n```bash\ncd apache-camel-fun-1/input_samples\nzip fun0.zip fun0.xml \u0026\u0026 mv fun0.zip ../input\nzip fun1.zip fun1.xml \u0026\u0026 mv fun1.zip ../input\nzip fun2.zip fun2.xml \u0026\u0026 mv fun2.zip ../input\nzip fun5.zip fun5.xml \u0026\u0026 mv fun5.zip ../input\nzip fun10.zip fun10.xml \u0026\u0026 mv fun10.zip ../input\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogervinas%2Fapache-camel-fun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogervinas%2Fapache-camel-fun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogervinas%2Fapache-camel-fun/lists"}