{"id":18284877,"url":"https://github.com/samlet/spring-cloud-stream-functional","last_synced_at":"2025-04-09T05:47:56.928Z","repository":{"id":95955694,"uuid":"424598863","full_name":"samlet/spring-cloud-stream-functional","owner":"samlet","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-04T13:06:48.000Z","size":68,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T00:28:45.512Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samlet.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":"2021-11-04T13:06:20.000Z","updated_at":"2021-11-04T13:06:51.000Z","dependencies_parsed_at":"2023-06-06T12:46:24.966Z","dependency_job_id":null,"html_url":"https://github.com/samlet/spring-cloud-stream-functional","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlet%2Fspring-cloud-stream-functional","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlet%2Fspring-cloud-stream-functional/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlet%2Fspring-cloud-stream-functional/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samlet%2Fspring-cloud-stream-functional/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samlet","download_url":"https://codeload.github.com/samlet/spring-cloud-stream-functional/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987108,"owners_count":21028891,"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-11-05T13:14:51.610Z","updated_at":"2025-04-09T05:47:56.912Z","avatar_url":"https://github.com/samlet.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Spring Cloud Stream Using Functional Programming\n\n### The technolgies used\n- Docker.\n- Spring boot 2.5.4 (Stable version at the time of this tuitorial).\n- Java 8. (原例是java-11)\n- Apache Kafka and zookeeper (Embedded from docker).\n\n### To start zookeeper and kafka using docker\nGo to root directory of project\n``` shell\n$ docker-compose up -d\n```\n\nStart main class as spring boot application, the application will be successful.\nHere is the console looks like as the producer will run for every 5 seconds will generate a random number and publishes to final topic that is intended for consumption.\n\n``` log\n/Library/Java/JavaVirtualMachines/jdk-11.0.9.jdk/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.......jar:/Users/ereshgorantla/Documents/Dev/gradle-6.5.1/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar com.cloud.stream.SpringCloudStreamFunctionalProgrammingApplication\n\n  .   ____          _            __ _ _\n /\\\\ / ___'_ __ _ _(_)_ __  __ _ \\ \\ \\ \\\n( ( )\\___ | '_ | '_| | '_ \\/ _` | \\ \\ \\ \\\n \\\\/  ___)| |_)| | | | | || (_| |  ) ) ) )\n  '  |____| .__|_| |_|_| |_\\__, | / / / /\n =========|_|==============|___/=/_/_/_/\n :: Spring Boot ::                (v2.5.4)\n\n2021-08-26 12:40:26.830  INFO 2917 --- [           main] udStreamFunctionalProgrammingApplication : Starting SpringCloudStreamFunctionalProgrammingApplication using Java 11.0.9 on Ereshs-MacBook-Pro.local with PID 2917 (/Users/ereshgorantla/Documents/Dev/My Work/medium/spring-cloud/spring-cloud-stream-examples/spring-cloud-stream-functional-programming/build/classes/java/main started by ereshgorantla in /Users/ereshgorantla/Documents/Dev/My Work/medium/spring-cloud/spring-cloud-stream-examples)\n2021-08-26 12:40:26.832  INFO 2917 --- [           main] udStreamFunctionalProgrammingApplication : No active profile set, falling back to default profiles: default\n2021-08-26 12:40:27.362  INFO 2917 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.\n2021-08-26 12:40:27.372  INFO 2917 --- [           main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.\n2021-08-26 12:40:27.420  INFO 2917 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-08-26 12:40:27.426  INFO 2917 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration' of type [org.springframework.boot.autoconfigure.integration.IntegrationAutoConfiguration$IntegrationJmxConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-08-26 12:40:27.433  INFO 2917 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration' of type [org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-08-26 12:40:27.436  INFO 2917 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'mbeanServer' of type [com.sun.jmx.mbeanserver.JmxMBeanServer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-08-26 12:40:27.447  INFO 2917 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationChannelResolver' of type [org.springframework.integration.support.channel.BeanFactoryChannelResolver] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-08-26 12:40:27.448  INFO 2917 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationDisposableAutoCreatedBeans' of type [org.springframework.integration.config.annotation.Disposables] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\n2021-08-26 12:40:27.651  INFO 2917 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9001 (http)\n2021-08-26 12:40:27.658  INFO 2917 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]\n2021-08-26 12:40:27.659  INFO 2917 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.52]\n2021-08-26 12:40:27.725  INFO 2917 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext\n2021-08-26 12:40:27.725  INFO 2917 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 866 ms\n2021-08-26 12:40:28.188  INFO 2917 --- [           main] o.s.c.s.binder.DefaultBinderFactory      : Creating binder: kafka\n2021-08-26 12:40:28.277  INFO 2917 --- [           main] o.s.c.s.binder.DefaultBinderFactory      : Caching the binder: kafka\n2021-08-26 12:40:28.277  INFO 2917 --- [           main] o.s.c.s.binder.DefaultBinderFactory      : Retrieving cached binder: kafka\n2021-08-26 12:40:28.304  INFO 2917 --- [           main] o.s.c.s.m.DirectWithAttributesChannel    : Channel 'application.fizzBuzzProcessor-in-0' has 1 subscriber(s).\n2021-08-26 12:40:28.305  INFO 2917 --- [           main] reactor.Flux.Map.1                       : onSubscribe(FluxMap.MapSubscriber)\n2021-08-26 12:40:28.306  INFO 2917 --- [           main] reactor.Flux.Map.1                       : request(unbounded)\n2021-08-26 12:40:28.311  INFO 2917 --- [           main] o.s.c.s.m.DirectWithAttributesChannel    : Channel 'application.fizzBuzzConsumer-in-0' has 1 subscriber(s).\n2021-08-26 12:40:28.474  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel errorChannel\n2021-08-26 12:40:28.527  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel fizzBuzzProducer_integrationflow.channel#0\n2021-08-26 12:40:28.539  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel fizzBuzzProcessor-out-0\n2021-08-26 12:40:28.558  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel fizzBuzzProcessor-in-0\n2021-08-26 12:40:28.562  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel nullChannel\n2021-08-26 12:40:28.567  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel fizzBuzzProducer-out-0\n2021-08-26 12:40:28.571  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageChannel fizzBuzzConsumer-in-0\n2021-08-26 12:40:28.577  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageHandler fizzBuzzProducer_integrationflow.org.springframework.integration.config.ConsumerEndpointFactoryBean#0\n2021-08-26 12:40:28.615  INFO 2917 --- [           main] o.s.i.monitor.IntegrationMBeanExporter   : Registering MessageHandler _org.springframework.integration.errorLogger\n2021-08-26 12:40:28.627  INFO 2917 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel\n2021-08-26 12:40:28.627  INFO 2917 --- [           main] o.s.i.channel.PublishSubscribeChannel    : Channel 'application.errorChannel' has 1 subscriber(s).\n2021-08-26 12:40:28.628  INFO 2917 --- [           main] o.s.i.endpoint.EventDrivenConsumer       : started bean '_org.springframework.integration.errorLogger'\n2021-08-26 12:40:28.644  INFO 2917 --- [           main] o.s.i.endpoint.ReactiveStreamsConsumer   : started bean 'fizzBuzzProducer_integrationflow.org.springframework.integration.config.ConsumerEndpointFactoryBean#0'\n2021-08-26 12:40:28.645  INFO 2917 --- [           main] o.s.c.s.binder.DefaultBinderFactory      : Retrieving cached binder: kafka\n2021-08-26 12:40:28.709  INFO 2917 --- [           main] o.s.c.s.b.k.p.KafkaTopicProvisioner      : Using kafka topic for outbound: numbers\n2021-08-26 12:40:28.712  INFO 2917 --- [           main] o.a.k.clients.admin.AdminClientConfig    : AdminClientConfig values: \n\tbootstrap.servers = [localhost:9092]\n\t --- [           main] org.apache.kafka.common.metrics.Metrics  : Closing reporter org.apache.kafka.common.metrics.JmxReporter\n2021-08-26 12:40:29.186  INFO 2917 --- [           main] org.apache.kafka.common.metrics.Metrics  : Metrics reporters closed\n2021-08-26 12:40:29.187  INFO 2917 --- [           main] o.a.kafka.common.utils.AppInfoParser     : App info kafka.consumer for consumer-anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0-1 unregistered\n2021-08-26 12:40:29.215  INFO 2917 --- [           main] o.s.c.stream.binder.BinderErrorChannel   : Channel 'numbers.anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0.errors' has 1 subscriber(s).\n2021-08-26 12:40:29.215  INFO 2917 --- [           main] o.s.c.stream.binder.BinderErrorChannel   : Channel 'numbers.anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0.errors' has 0 subscriber(s).\n2021-08-26 12:40:29.215  INFO 2917 --- [           main] o.s.c.stream.binder.BinderErrorChannel   : Channel 'numbers.anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0.errors' has 1 subscriber(s).\n2021-08-26 12:40:29.215  INFO 2917 --- [           main] o.s.c.stream.binder.BinderErrorChannel   : Channel 'numbers.anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0.errors' has 2 subscriber(s).\n2021-08-26 12:40:29.229  INFO 2917 --- [           main] o.a.k.clients.consumer.ConsumerConfig    : ConsumerConfig values: \n\tallow.auto.create.topics = true\n\tauto.commit.interval.ms = 100\n\torg.apache.kafka.common.serialization.ByteArrayDeserializer\n\n2021-08-26 12:40:29.389  INFO 2917 --- [container-0-C-1] o.a.k.c.c.internals.AbstractCoordinator  : [Consumer clientId=consumer-anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0-2, groupId=anonymous.ac088754-30d4-45e9-87c3-071bc7a661d0] (Re-)joining group\n2021-08-26 12:40:29.390  INFO 2917 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka version: 2.7.1\n2021-08-26 12:40:29.390  INFO 2917 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka commitId: 61dbce85d0d41457\n2021-08-26 12:40:29.390  INFO 2917 --- [           main] o.a.kafka.common.utils.AppInfoParser     : Kafka startTimeMs: 1629961829390\n2021-08-26 12:40:29.390  INFO 2917 --- [           main] o.a.k.clients.consumer.KafkaConsumer     : [Consumer clientId=consumer-anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847-4, groupId=anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847] Subscribed to topic(s): fizz-buzz\n\n.........\n\n2021-08-26 12:40:32.422  INFO 2917 --- [container-0-C-1] o.a.k.c.c.internals.ConsumerCoordinator  : [Consumer clientId=consumer-anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847-4, groupId=anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847] Finished assignment for group at generation 1: {consumer-anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847-4-70428fe6-70b3-41d9-8280-b8105e0ce762=Assignment(partitions=[fizz-buzz-0])}\n2021-08-26 12:40:32.480  INFO 2917 --- [container-0-C-1] o.a.k.c.c.internals.AbstractCoordinator  : [Consumer clientId=consumer-anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847-4, groupId=anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847] Successfully synced group in generation Generation{generationId=1, memberId='consumer-anonymous.4673ffb3-55d5-49fe-8cbb-9b8934ba3847-4-70428fe6-70b3-41d9-8280-b8105e0ce762', protocol='range'}\n\n....\n\n2021-08-26 12:40:34.165  INFO 2917 --- [container-0-C-1] o.a.kafka.common.utils.AppInfoParser     : Kafka commitId: 61dbce85d0d41457\n2021-08-26 12:40:34.165  INFO 2917 --- [container-0-C-1] o.a.kafka.common.utils.AppInfoParser     : Kafka startTimeMs: 1629961834165\n2021-08-26 12:40:34.171  INFO 2917 --- [ad | producer-4] org.apache.kafka.clients.Metadata        : [Producer clientId=producer-4] Cluster ID: jGpZSsM1QYyHKuc0Eu2XLA\n2021-08-26 12:40:34.181  INFO 2917 --- [container-0-C-1] c.cloud.stream.kafka.KafkaConfiguration  : Consumer Received : Fizz\n2021-08-26 12:40:39.060  INFO 2917 --- [     parallel-1] reactor.Flux.Map.2                       : onNext(7061)\n2021-08-26 12:40:39.070  INFO 2917 --- [container-0-C-1] reactor.Flux.Map.1                       : onNext(7061)\n2021-08-26 12:40:39.079  INFO 2917 --- [container-0-C-1] c.cloud.stream.kafka.KafkaConfiguration  : Consumer Received : 7061\n2021-08-26 12:40:44.054  INFO 2917 --- [     parallel-1] reactor.Flux.Map.2                       : onNext(1952)\n2021-08-26 12:40:44.061  INFO 2917 --- [container-0-C-1] reactor.Flux.Map.1                       : onNext(1952)\n2021-08-26 12:40:44.067  INFO 2917 --- [container-0-C-1] c.cloud.stream.kafka.KafkaConfiguration  : Consumer Received : 1952\n2021-08-26 12:40:49.053  INFO 2917 --- [     parallel-1] reactor.Flux.Map.2                       : onNext(4424)\n2021-08-26 12:40:49.061  INFO 2917 --- [container-0-C-1] reactor.Flux.Map.1                       : onNext(4424)\n2021-08-26 12:40:49.067  INFO 2917 --- [container-0-C-1] c.cloud.stream.kafka.KafkaConfiguration  : Consumer Received : 4424\n-------------\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlet%2Fspring-cloud-stream-functional","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamlet%2Fspring-cloud-stream-functional","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamlet%2Fspring-cloud-stream-functional/lists"}