-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hystrix默认使用Archaius 来实现的动态配置,我们在上节中,使用了代码的方式来实现配置,这节,我们使用Hystrix的动态配置来实现。
超时时间
1、Hystrix配置整体的超时时间
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=1000
2、配置单个超时时间
hystrix.command.HystrixCommandKey.execution.isolation.thread.timeoutInMilliseconds=1000
hystrix.command.HystrixCommandKey.execution.isolation.strategy = SEMAPHORE
其中HystrixCommandKey为@HystrixCommand 注解中的commandKey。
@HystrixCommand(groupKey = "StoreSubmission", commandKey = "StoreSubmission", threadPoolKey = "StoreSubmission")
public String storeSubmission(ReturnType returnType, InputStream is, String id) {
}
Metadata
Metadata
Assignees
Labels
No labels