marinkobabic / axon-kafka-example

Example of axon-kafka module usage
12 stars 11 forks source link

can you help me to solve this problem #2

Open wuzhuang5-zz opened 6 years ago

wuzhuang5-zz commented 6 years ago

can you help me to solve this problem . thanks

marinkobabic commented 6 years ago

Are you using the example like it is including the docker-compose file for the Kafka server?

On Fri, Aug 24, 2018, 11:55 John Wu notifications@github.com wrote:

can you help me to sove this problem . thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/marinkobabic/axon-kafka-example/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHSOJBkGWbwRK6r-sjzld787redWz6eks5uT82OgaJpZM4WLEv8 .

wuzhuang5-zz commented 6 years ago

I didn't use docker. I used Kafka in this machine.

wuzhuang5-zz commented 6 years ago

I'll try.

marinkobabic commented 6 years ago

What is the actual issue? Producer does not work? Consumer does not work? Please set the logging level to debug and send post the log of the application here.

On Sun, Aug 26, 2018, 11:12 John Wu notifications@github.com wrote:

I didn't use docker. I used Kafka in this machine.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marinkobabic/axon-kafka-example/issues/2#issuecomment-416024794, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHSOJJ_W9OdHcNue7XhJBhoGZq8lZQPks5uUmZkgaJpZM4WLEv8 .

wuzhuang5-zz commented 6 years ago

BUILD FAILED in 0s

wuzhuang5-zz commented 6 years ago

What social software do you use, can I add some questions to you? On axon framework

wuzhuang5-zz commented 6 years ago

thanks very much

wuzhuang5-zz commented 6 years ago

2018-08-26 19:59:59.201 INFO 2127 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2018-08-26 19:59:59.210 ERROR 2127 --- [ main] o.s.boot.SpringApplication : Application run failed

java.lang.IllegalStateException: Failed to execute CommandLineRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:803) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:784) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at com.mykafka.producer.ProducerApplication.main(ProducerApplication.java:23) [classes/:na] Caused by: org.apache.kafka.common.KafkaException: Failed to construct kafka producer at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:441) ~[kafka-clients-1.0.2.jar:na] at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:268) ~[kafka-clients-1.0.2.jar:na] at org.axonframework.kafka.eventhandling.producer.DefaultProducerFactory.createKafkaProducer(DefaultProducerFactory.java:161) ~[axon-kafka-3.3.2.jar:3.3.2] at org.axonframework.kafka.eventhandling.producer.DefaultProducerFactory.createTransactionalProducer(DefaultProducerFactory.java:145) ~[axon-kafka-3.3.2.jar:3.3.2] at org.axonframework.kafka.eventhandling.producer.DefaultProducerFactory.createProducer(DefaultProducerFactory.java:93) ~[axon-kafka-3.3.2.jar:3.3.2] at org.axonframework.kafka.eventhandling.producer.KafkaPublisher.send(KafkaPublisher.java:117) ~[axon-kafka-3.3.2.jar:3.3.2] at org.axonframework.eventhandling.AbstractEventBus.lambda$prepareCommit$15(AbstractEventBus.java:231) ~[axon-core-3.3.3.jar:3.3.3] at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:891) ~[na:1.8.0_171] at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:404) ~[na:1.8.0_171] at org.axonframework.eventhandling.AbstractEventBus.prepareCommit(AbstractEventBus.java:231) ~[axon-core-3.3.3.jar:3.3.3] at org.axonframework.eventhandling.AbstractEventBus.publish(AbstractEventBus.java:134) ~[axon-core-3.3.3.jar:3.3.3] at org.axonframework.eventhandling.EventBus.publish(EventBus.java:70) ~[axon-core-3.3.3.jar:3.3.3] at com.mykafka.producer.Sender.send(Sender.java:26) ~[classes/:na] at com.mykafka.producer.ProducerApplication.run(ProducerApplication.java:32) [classes/:na] at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:800) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] ... 5 common frames omitted Caused by: org.apache.kafka.common.config.ConfigException: No resolvable bootstrap urls given in bootstrap.servers at org.apache.kafka.clients.ClientUtils.parseAndValidateAddresses(ClientUtils.java:64) ~[kafka-clients-1.0.2.jar:na] at org.apache.kafka.clients.producer.KafkaProducer.(KafkaProducer.java:396) ~[kafka-clients-1.0.2.jar:na] ... 19 common frames omitted

2018-08-26 19:59:59.211 INFO 2127 --- [ main] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@7fa98a66: startup date [Sun Aug 26 19:59:22 CST 2018]; root of context hierarchy 2018-08-26 19:59:59.212 INFO 2127 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0 2018-08-26 19:59:59.213 INFO 2127 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase -1073741824 2018-08-26 19:59:59.213 INFO 2127 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase -2147482648 2018-08-26 19:59:59.215 INFO 2127 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown

wuzhuang5-zz commented 6 years ago

oh man The project worked. Thank you.

wuzhuang5-zz commented 6 years ago

i want to run it in one applicaiton.yml `axon: kafka: producer:defaulttopic: mydefaulttopic producer: retries: 5 bootstrapservers:

marinkobabic commented 6 years ago

You would like to combine the two applications into one?

On Sun, Aug 26, 2018, 14:16 John Wu notifications@github.com wrote:

i want to run it in one applicaiton.yml axon: kafka: producer:defaulttopic: mydefaulttopic producer: retries: 5 bootstrapservers: - 127.0.0.1:9092 transaction-id-prefix: clxtrx client-id: myproducer eventhandling: processors: "[MyProcessor]": source: kafkaMessageSource mode: TRACKING clientid: myconsumer defaulttopic: mydefaulttopic consumer: group-id: boot bootstrapservers: - 127.0.0.1:9092 Is this the right configuration? Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/marinkobabic/axon-kafka-example/issues/2#issuecomment-416034843, or mute the thread https://github.com/notifications/unsubscribe-auth/ADHSOPL_XTs__5rhFLfXInyGAjT1xUoYks5uUpGtgaJpZM4WLEv8 .

wuzhuang5-zz commented 6 years ago

yes,in one service.

marinkobabic commented 6 years ago

Have you been able to solve this problem?