Within next few months 6th edition of Spring in Action is going to be published.
It is said, it will not contain 3 chapters from 5th edition i.e. Circut Breaker,
Eureka Service-Client Discovery, Eureka Server-Client Configuration.
Instead of this, it will include changes made in Spring Boot 2.4. I have
alread heard that Circut Breaker (Hystrix) is outdated, but I wonder what about
rest, especially omitted chapters ? I noticed that I can not choose ribbon in newest(2.4.3) Spring Boot version, zipkin also differs from earlies ones. What is alternative for ribbon in newest version?
The Spring Cloud project is moving to their own solutions.
Ribbon is replaced by the Spring Cloud Load Balancer, Hysterix by the Spring Cloud Circuit Breaker, Zuul by the Spring Cloud Gateway.
This is a good read, including examples, about this topic: https://piotrminkowski.com/2020/05/01/a-new-era-of-spring-cloud/
Related
If I understand the answer to this question correctly, Spring Cloud Sleuth will be replaced by Micormeter Tracing with Spring Boot 3. My experiments with Spring Boot 3 milestone 3 to implement tracing have failed so far. Is there an example project somewhere that I can use to guide me.
BTW: Here are my experiments https://github.com/stse/spring-boot-otel. I try to use micrometer tracing and open telemetry to push traces to new relic via Otlp and Grpc.
This blogpost from Spring Team will help to set it up: https://spring.io/blog/2022/10/12/observability-with-spring-boot-3
Also, I have come up with a sample Spring Boot 3 + Micrometer project here - https://github.com/kishorek/java/tree/main/spring-observability-demo.
I am using Zipkin Brave as distributed tracing implementation. I have created a python service consumed by the Spring boot service. Please refer to the README.
I have been working for a while with Spring micro-services and have no come across Apache Camel as a tool for building micro-services. I'm unclear -- is Apache Camel a replacement for creating micro-sevices with Spring Boot or does it add functionality / short-cuts to developing such services with Spring Boot? It's already fairly simple to create microservices with Spring Boot so it's hard to imagine what Apache Camel would add but that is the essence of my question.
Apache Camel has nothing to do with microservices.
It's an implementation of the Enterprise Integration Patterns: https://www.enterpriseintegrationpatterns.com/
Apache Camel provides an implementation for most of the patterns from the book from Gregor Hohpe and Bobby Woolf. Plus a variety of inbound and outbound endpoints to integrate with systems like the file system, FTP, HTTP, Messaging, Facebook etc.
Find more information on the website: https://camel.apache.org/
There is a Spring Boot Starter project to run Camel in a Spring Boot application:
https://camel.apache.org/spring-boot.html
what Apache Camel would add, that is the essence of my question
In service of declaring REST based microservices, Camel's REST DSL provides a fluent API for declaring microservices. Take for example:
rest("/books").produces("application/json")
.get().outType(Book[].class)
.to("bean:bookService?method=getBooks(${header.bookCategory})")
Should tell you at a glance that requests to the path /books will get you a List of Book, as long as you send a request parameter named bookCategory. This is mapped to a POJO bean called bookService.
Spring Boot is a framework which simplifies application packing and startup while Spring is the actual framework which has libraries for performing various tasks.
Technically, we can use Camel for building micro-services as well and many aspects of camel depend on Spring. If you foresee many integration related functionality like sending email or communicating with other system, you can use also use Hexagonal architecture.
We want to integrate legacy grails 2.4 and java7 application to our microservices infrastructure. We use spring cloud netflix, Camden.SR4 release and java8 in microservices setup. We use zuul, eureka, config service.
I know that with grails 3 this task is relatively easy, but currently we cant do that.
The biggest question is how can I register grails 2.4 app in Eureka.
Also, we don't want to use sidecar at the moment.
Spring Cloud requires Spring Boot. There's nothing keeping you from using the netflix eureka libraries directly.
https://github.com/Netflix/eureka/blob/master/eureka-examples/src/main/java/com/netflix/eureka/ExampleEurekaClient.java
we are evaluating Eureka as central SD environment for our Spring Boot applications. Here we are using Spring Cloud. We figured out, that due to the fact, that we make use of RestEasy quite a lot and Eureka is based on Jersey, we run into bigger conflicts. Our rest-easy based APIs are throwing a lot of errors. It's basically no good idea to mix Jersey with Resteasy in the same application.
Question: Is there a way to change the jersey dependency or remove the lib somehow in order to avoid lib problems with RestEasy?
Best
fri
Not currently, it's how the eureka client is built. An alternative might be spring-cloud-consul, which doesn't use eureka, but provides integration with Ribbon and Zuul. Hystrix also works fine.
We have an enterprise application using Spring 3.2.8 and Spring Web Flow 2.3.3 deployed on the Websphere 8 server. We wish to report statistics like no. of incomplete flows, the state at which user terminate the flow, time spent at individual states etc. We thought of using Spring Instrumentation. However, could not find instrumentation jar package for Spring 3.2 and Webflow 2.3. Where can I find the complete distribution of Spring 3.2 instrumentation jars? Or which other tool can I use for my purpose with Websphere 8? Please help.
I just did a google search. If I read the webpage correctly, instrumented spring is a paid product.
From http://static.springsource.com/projects/instrumentation/index.html:
Instrumented Spring Framework, Web Services, Web Flow, and Security are available as part of a tc Server Spring Edition 2.x subscription or evaluation, which includes integration with Hyperic HQ. Instrumented Spring products are also available to Spring Enterprise subscribers.