Skip to content

add HystrixCommand support#280

Merged
codefromthecrypt merged 1 commit into
OpenFeign:masterfrom
spencergibb:hystrix
Oct 16, 2015
Merged

add HystrixCommand support#280
codefromthecrypt merged 1 commit into
OpenFeign:masterfrom
spencergibb:hystrix

Conversation

@spencergibb

Copy link
Copy Markdown
Contributor

fixes gh-189

@cloudbees-pull-request-builder

Copy link
Copy Markdown

NetflixOSS » feign » feign-pull-requests #160 SUCCESS
This pull request looks good

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required to change the return type to the actual type to send on to the decoder. If the return type is HystrixCommand<User>, User is set as the return type.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting..

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, good catch.

@codefromthecrypt

Copy link
Copy Markdown

wondering out loud.. Seems the problem is trying to work within the invocation handler. What if you subclass Feign.Builder?

ReflectiveFeign's constructor has everything you need (I think) to ensure the right type gets into MethodMetadata in the first place.

Not that this would work, but.. new HystrixedFeignBuilder()...not setting invocation factory.. build()

@spencergibb

Copy link
Copy Markdown
Contributor Author

So move the mangling the methodMetadata to the new builder and automatically set the invocation handler there?

@codefromthecrypt

Copy link
Copy Markdown

or maybe add a method to InvocationHandlerFactory, exposing the setters public as you mentioned.

MethodMetadata InvocationHandlerFactory.decorate(MethodMetadata in)

@codefromthecrypt

Copy link
Copy Markdown

Either way, I suppose.. with Hystrix you don't need a new builder per-se.. gets more complicated with things like RxNetty which need to set multiple builder methods to work. Just thinking if we should continue with invocationhandlerfactory as a builder method, or basically say, make a new builder if you need to set a invocationhandlerfactory. wdyt?

@spencergibb

Copy link
Copy Markdown
Contributor Author

Not sure. I could knock both out and see what they look like. Then we could compare?

@codefromthecrypt

codefromthecrypt commented Oct 16, 2015 via email

Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it logged not printed?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing

@spencergibb spencergibb force-pushed the hystrix branch 2 times, most recently from 2eaa6bd to ab970d4 Compare October 16, 2015 20:29
Comment thread hystrix/README.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or to apply hystrix to existing feign methods.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like..

// plain methods will inherit hystrix synchronous behavior

Comment thread README.md Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/creates a builder that //

builder isn't the headline

@cloudbees-pull-request-builder

Copy link
Copy Markdown

NetflixOSS » feign » feign-pull-requests #166 SUCCESS
This pull request looks good

Comment thread hystrix/README.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@codefromthecrypt

Copy link
Copy Markdown

:shipit:

@cloudbees-pull-request-builder

Copy link
Copy Markdown

NetflixOSS » feign » feign-pull-requests #167 SUCCESS
This pull request looks good

codefromthecrypt pushed a commit that referenced this pull request Oct 16, 2015
@codefromthecrypt codefromthecrypt merged commit c9c5e31 into OpenFeign:master Oct 16, 2015
@codefromthecrypt codefromthecrypt added this to the 8.11.0 milestone Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feign with hystrix

4 participants