{"id":15344545,"url":"https://github.com/ricardozanini/ce-processing","last_synced_at":"2026-04-20T05:36:36.396Z","repository":{"id":79133733,"uuid":"277919338","full_name":"ricardozanini/ce-processing","owner":"ricardozanini","description":"Vert.x + CloudEvents + Knative playground","archived":false,"fork":false,"pushed_at":"2023-12-01T17:22:41.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T18:52:37.989Z","etag":null,"topics":["cloudevents","knative","kubernetes","vertx"],"latest_commit_sha":null,"homepage":"","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/ricardozanini.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-07T20:49:59.000Z","updated_at":"2023-12-01T17:22:42.000Z","dependencies_parsed_at":"2025-02-01T21:40:30.151Z","dependency_job_id":"060a6d44-82eb-4790-8644-03377db0cb0b","html_url":"https://github.com/ricardozanini/ce-processing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ricardozanini/ce-processing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardozanini%2Fce-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardozanini%2Fce-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardozanini%2Fce-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardozanini%2Fce-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardozanini","download_url":"https://codeload.github.com/ricardozanini/ce-processing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardozanini%2Fce-processing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32035024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"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":["cloudevents","knative","kubernetes","vertx"],"created_at":"2024-10-01T11:00:10.487Z","updated_at":"2026-04-20T05:36:36.374Z","avatar_url":"https://github.com/ricardozanini.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudEvents Processing\n\nThis is a very simple showcase of how to use the [CloudEvent Java SDK](https://github.com/cloudevents/sdk-java) to process\nevents in a Kubernetes cluster on top of Knative.\n\nThe following image illustrates the architecture of the showcase.\nTake a look at the [`kubernetes`](kubernetes) directory for more details about the\nobjects created in the cluster.\n\n![](CE-Processing-Architecture.png)\n\n## Try it out locally\n\nThis image is available on Quay.io:\n\n```shell script\n$ podman run --rm -it -p 8080:8080 quay.io/ricardozanini/ce-processing:1.0\n```\n\nThen just `curl` the 8080 port:\n\n```shell script\n$ curl -X POST \\\n    -H \"content-type: application/json\"  \\\n    -H \"ce-specversion: 1.0\"  \\\n    -H \"ce-source: curl-command\"  \\\n    -H \"ce-type: curl.demo\"  \\\n    -H \"ce-id: 123-abc\"  \\\n    -d '{\"name\":\"Zanini\"}' \\\nhttp://localhost:8080\n```\n\nYou should see the application logs like:\n\n```shell script\n19:20:51.078 [vert.x-eventloop-thread-1] INFO  o.m.c.ce.CloudEventConsumerVerticle - Initializing Vertx Server\n19:20:51.178 [vert.x-eventloop-thread-2] INFO  o.m.c.ce.CloudEventProducerVerticle - CE Publisher started, will publish events to 'http://localhost:8080/' endpoint\n19:20:51.180 [vert.x-eventloop-thread-0] INFO  org.m88i.cloud.ce.MainVerticle - Successfully deployed MainVerticle\n19:20:51.183 [vert.x-eventloop-thread-1] INFO  o.m.c.ce.CloudEventConsumerVerticle - Server started on port 8080\nJul 10, 2020 7:20:51 PM io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer\nINFO: Succeeded in deploying verticle\n19:21:05.802 [vert.x-eventloop-thread-1] INFO  o.m.c.ce.CloudEventConsumerVerticle - Received event: \n☁ ️cloudevents.Event\nContext Attributes,\n\tspecversion: 1.0\n\ttype: curl.demo\n\tsource: curl-command\n\tid: 123-abc\n\ttime: null\nExtensions,\nData,\n\t{\"name\":\"Zanini\"}\n19:21:05.822 [vert.x-eventloop-thread-2] INFO  o.m.c.ce.CloudEventProducerVerticle - Received internal message. Creating new CE request to http://localhost:8080/\n19:21:05.869 [vert.x-eventloop-thread-1] INFO  o.m.c.ce.CloudEventConsumerVerticle - Received event: \n☁ ️cloudevents.Event\nContext Attributes,\n\tspecversion: 1.0\n\ttype: success.ce.demo\n\tsource: 69af641bcc77\n\tid: 67c4944f-7379-40d5-b2b9-ea2bd436353b\n\ttime: null\nExtensions,\nData,\n\tCE Processed ID: 123-abc\n19:21:05.870 [vert.x-eventloop-thread-1] INFO  o.m.c.ce.CloudEventConsumerVerticle - Won't emit a follow up CloudEvent since CloudEvent{id='67c4944f-7379-40d5-b2b9-ea2bd436353b', source=69af641bcc77, type='success.ce.demo', datacontenttype='null', dataschema=null, subject='null', time=null, data=[67, 69, 32, 80, 114, 111, 99, 101, 115, 115, 101, 100, 32, 73, 68, 58, 32, 49, 50, 51, 45, 97, 98, 99], extensions={}} comes from a local source\n```\n\n## Running with Knative Eventing\n\n1. Install [`minikube`](https://kubernetes.io/docs/tasks/tools/install-minikube/) and `kubectl` or have a Kubernetes cluster available\n2. Setup [Istio + Knative](https://knative.dev/docs/install/)\n\n```shell script\n# create the namespace\nkubectl create namespace ce\n# enable Knative Eventing injection\nkubectl label namespace ce knative-eventing-injection=enabled\n# deploy the application\nkubectl apply -f kubernetes/ce-service-deploy.yaml -n ce\n# deploy consumer and producers for the application\nkubectl apply -f kubernetes/consumer-trigger.yaml -n ce\nkubectl apply -f kubernetes/producer-sinkbinding.yaml -n ce\n# deploy the event display\nkubectl apply -f kubernetes/event-display.yaml -n ce\n# deploy the event source\nkubectl apply -f kubernetes/emitter.yaml -n ce\n```\n\nTo see the showcase in action, try looking the logs of the deployed application:\n\n```shell script\nkubectl logs -f ce-processing-\u003chash\u003e -n ce\n```\n\n## References\n\n- [Setting up Knative Eventing Resources](https://knative.dev/docs/eventing/getting-started/#setting-up-knative-eventing-resources)\n- [Processing CloudEvents with Eclipse Vert.x](https://developers.redhat.com/blog/2018/12/11/processing-cloudevents-vertx/)\n- [CloudEvents Java SDK](https://github.com/cloudevents/sdk-java/tree/master/http/vertx)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardozanini%2Fce-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardozanini%2Fce-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardozanini%2Fce-processing/lists"}