You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before Brixton.RC1, we had ObservableReturnValueHandler. That apparently has been dropped in favor of SingleReturnValueHandler, which IMO makes a lot of sense. Naturally, I switched over to Single, but then found that hystrix doesn't work with Single (Netflix/Hystrix#1088). I'm getting
com.netflix.hystrix.contrib.javanica.exception.FallbackDefinitionException: Incompatible return types. Command method: public rx.Single com.build.coordination.order.OrderServiceImpl.getCustomerOrders(int), fallback method: public java.util.List com.build.coordination.order.OrderServiceImpl.getCustomerOrdersFallback(int). Hint:
at com.netflix.hystrix.contrib.javanica.utils.FallbackMethod.validateReturnType(FallbackMethod.java:132) ~[hystrix-javanica-1.5.2.jar:1.5.2]
at com.netflix.hystrix.contrib.javanica.utils.FallbackMethod.validateReturnType(FallbackMethod.java:111) ~[hystrix-javanica-1.5.2.jar:1.5.2]
at com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect$MetaHolderFactory.metaHolderBuilder(HystrixCommandAspect.java:122) ~[hystrix-javanica-1.5.2.jar:1.5.2]
where I use @HystrixCommand and return an rx.java.Single. This applies to both Brixton.RC1 and Brixton.BUILD-SNAPSHOT. The only workaround is to use Observable here and convert to single before I return from my controller via Observable.toSingle(). That's quite a nasty thing to require. Is there going to be some solution for this before Brixton goes GA?
The text was updated successfully, but these errors were encountered:
I think you hit the nail on the head. We moved from Observable to Single because the framework can't know if your Observable emits just one value or multiple. Until Hystrix supports Single, I'm afraid your workaround is the only thing to do.
Before Brixton.RC1, we had ObservableReturnValueHandler. That apparently has been dropped in favor of SingleReturnValueHandler, which IMO makes a lot of sense. Naturally, I switched over to Single, but then found that hystrix doesn't work with Single (Netflix/Hystrix#1088). I'm getting
where I use @HystrixCommand and return an rx.java.Single. This applies to both Brixton.RC1 and Brixton.BUILD-SNAPSHOT. The only workaround is to use Observable here and convert to single before I return from my controller via Observable.toSingle(). That's quite a nasty thing to require. Is there going to be some solution for this before Brixton goes GA?
The text was updated successfully, but these errors were encountered: