The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

lucas.de (2) [Avatar] Offline
#1
Hi,

On chapter 5.4 you set up the hystric-core version to 1.0.2 in client's pom.

<dependency>
	<groupId>com.netflix.hystrix</groupId>
	<artifactId>hystrix-core</artifactId>
	<version>1.0.2</version>
</dependency>


This version is quite old and as far as we're using Spring-cloud's BOM in version Camden.SR4 today, the version 1.0.2 conflicts with the bom's one which reference 1.5.6.
This is a huge gap between versions and the code sample you show in chapter 5.5 for customizing Hystrix's timeout no longer works with recent versions.

@HystrixCommand(
threadProperties={@HystrixProperty( 
name="execution.isolation.thread.timeoutInMilliseconds", 
value="12000")})
public List<License> getLicensesByOrg(String organizationId){
randomlyRunLong();
return licenseRepository.findByOrganizationId(organizationId);


Can you update this with a more recent version or eventually use https://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-javanica from Hystrix?

Best regards,

Lucas
lucas.de (2) [Avatar] Offline
#2
The corrected version with more recent version of Hystrix-core is:

@HystrixCommand(commandProperties = {
        @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "12000")
    })
John Carnell (26) [Avatar] Offline
#3
Hi Luca,

Thanks for letting me know I will take a look at. I began this book a little over e a year ago and the Hystrix chapter was one of the first chapters. Let me take a look. It might not get fixed right away because I am probably going to sweep through the book and update to camden at some point.

Thanks,
John
vyurik (76) [Avatar] Offline
#4
Hi Lucas and John Carnell,
The final_code doesn't have hsytrix-core in any of the pom.xml.
On the other hand, hystrix-javanica version used is 1.5.9.
<dependency>
<groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
<version>1.5.9</version>
</dependency>
Does it mean that the issue noticed by Lucas has been solved?

Regards,
Vitaly