I know that I'm using a different setup then the author did when they wrote the book and code for the book. In fact I'm using JDK 9.0.x, Windows 10 Pro and I'm programming this using Kotlin not Java.
I'm currently working with the code from chapter 7, part 1 where you have a Comment package running by itself, a Image package running by itself and a Eureka server running by itself.
I suspect that the SpringAMQP message is not being received, but I do not now how to fix this.
How can I go about debugging the message delivery/receiving parts?
Are you able to verify that the code from Chapter 7, Part 1 works as expected?
The issue that I'm facing right now is that new comments are not sent to the Comment package so that they can be saved in the server. Before I split up the program up comments where being saved.
Here are the image file records as shown in MongoDB
> db.image.find()
{ "_id" : "562bf88f-38e7-4927-a4f9-c04017042cbf", "name" : "image5.png", "_class" : "ca.letkeman.learningspringboot.images.Image" }
{ "_id" : "21879969-46ab-44e9-8e85-6a5f00172fc8", "name" : "image1.png", "_class" : "ca.letkeman.learningspringboot.images.Image" }
I do not get any errors showing up in the images package logs as show below
DEBUG 11492 --- [ctor-http-nio-3] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Looking up handler method for path /comments
DEBUG 11492 --- [ctor-http-nio-3] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Did not find handler method for [/comments]
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre map : | onSubscribe([Fuseable] FluxOnAssembly.OnAssemblySubscriber)
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre flatmap : | onSubscribe([Fuseable] FluxOnAssembly.OnAssemblySubscriber)
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre flatmap : | request(unbounded)
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre map : | request(unbounded)
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre map : | onNext(Comment(id=null, imageId=562bf88f-38e7-4927-a4f9-c04017042cbf, comment=test))
INFO 11492 --- [ctor-http-nio-3] Constructor : onNext(GenericMessage [payload=Comment(id=null, imageId=562bf88f-38e7-4927-a4f9-c04017042cbf, comment=test), headers={contentType=application/json, id=cb535384-5bd2-6df8-81e0-cd6bd294662b, timestamp=1516732480640}])
INFO 11492 --- [ctor-http-nio-3] o.s.a.r.c.CachingConnectionFactory : Created new connection: SpringAMQP#6115a27d:0/SimpleConnection@25d44445 [delegate=amqp://[email protected]:5672/, localPort= 65519]
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre flatmap : | onNext(Comment(id=null, imageId=562bf88f-38e7-4927-a4f9-c04017042cbf, comment=test))
INFO 11492 --- [ctor-http-nio-3] addComment-commentsink-redirect : onSubscribe([Fuseable] FluxOnAssembly.OnAssemblySubscriber)
INFO 11492 --- [ctor-http-nio-3] addComment-commentsink-redirect : request(unbounded)
INFO 11492 --- [ctor-http-nio-3] addComment-commentsink-redirect : onNext(redirect:/)
INFO 11492 --- [ctor-http-nio-3] addComment-commentsink-redirect : onComplete()
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre map : | onComplete()
INFO 11492 --- [ctor-http-nio-3] addComment-newComment pre flatmap : | onComplete()
DEBUG 11492 --- [ctor-http-nio-3] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Looking up handler method for path /
DEBUG 11492 --- [ctor-http-nio-3] .b.a.e.w.r.WebFluxEndpointHandlerMapping : Did not find handler method for [/]
INFO 11492 --- [ctor-http-nio-3] homecontroller-index : onSubscribe([Fuseable] FluxOnAssembly.OnAssemblySubscriber)
INFO 11492 --- [ctor-http-nio-3] homecontroller-index : request(unbounded)
INFO 11492 --- [ctor-http-nio-3] homecontroller-index : onNext(index)
INFO 11492 --- [ctor-http-nio-3] Findall : | onSubscribe([Fuseable] FluxOnAssembly.OnAssemblySubscriber)
INFO 11492 --- [ctor-http-nio-3] Findall : | request(unbounded)
The standalone Comment package does not have show any errors, but it does show the following line every five minutes:
INFO 13012 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver : Resolving eureka endpoints via configuration
I should point out that I've tried using Java instead of Kotlin on all three systems and I get the same result. I even copied the application.yml for each system to my local setup and the result remains the same.