-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feign can never compress request/response. #1580
Comments
The This might have worked before this change 959b007. Maybe @spencergibb can verify? |
@ryanjbaxter the pom line you pointed to is |
Right but I think the problem is that When the bean was being created twice before (which I agree is a bug) the problem probably didnt exist....at least that is my theory. |
So the fix is |
Yes I think so. But I am also wondering why the condition on the |
seems HAPPEN in Camden.SR4, too. |
@jmnarloch bump, see my comment above, would love your insight. |
Hi, This is happening to us also (spring cloud 1.2.2) Thanks. |
@jpuigsegur I was hoping @jmnarloch would comment on the issue, but at this point I think we can just make the change. I dont have a workaround at the moment, I think we can just make the fix I proposed |
@jpuigsegur and @eacdy could you please try the fix in this branch and see if it works for you? You can clone the branch, do |
Hello @ryanjbaxter, Thank you for your time. |
Thanks, made a change there as well. Let me know how it works. |
@pgonzalezgua @jpuigsegur we are about to do a Camden SR release. I would like to get this in. Did you confirm that the changes are working as expected? |
Hi, Yes the request compression is working for us with these changes. |
This has been fixed in both the 1.2.x and master branches. |
Hi, @ryanjbaxter I cannot get this to work. If I create a Spring Boot 1.5.7.RELEASE (Dalston.SR4) Starter Project in eclipse with the following dependencies
and add
then GZIP is not enabled
The only way to get this to work is to add
Thanks |
@ryanjbaxter @spencergibb We have more or less the same situation as @davidmelia The way @davidmelia described is not working at all because if we are adding a ApacheHttpClient bean to the context the service is starting up, the auto cfg's are triggering and the header will be set but now the service discovery is not working anymore. Therefore we are in limbo a little bit and don't really know how to configure/use the compression feature. We are running Spring Boot 1.5.7 and Dalston.SR4. The resolved Spring Cloud Netflix Core version is 1.3.5.RELEASE. |
@gbtec-ingogriebsch I dont see why service discovery isnt working. I think you should open a new issue for this. |
@ryanjbaxter In general I would still like to understand how one should configure his system to get compression used on Feign if using Spring Boot 1.5.x and Spring Cloud Dalston.SRX. If I understand it right it is not necessary to do what @davidmelia is trying to do. And I also would like to avoid configuring a ApacheHttpClient @bean if it is not really necessary. Therefore it would be really helpful if you could give some hint about how to do it. The thing with the service discovery is a problem I got after I added a new @bean of type ApacheHttpClient to my context. Having this bean in the context is enabling the compression but if I try to execute the remote call to the other service which is registered at my local eureka I now get an exception the moment Feign is trying to reach the service. Without having a ApacheHttpClient @bean in the context the remote call is working but then I have no compression. Before creating a new issue I would like to understand if it is intended to configure a ApacheHttpClient @bean to get the compression enabled. I would really appreciate a little bit more detailed answer respectively explanation... :) |
@gbtec-ingogriebsch no you should not have to configure a new |
@ryanjbaxter I have created issue #2462 to clarify if there is a bug or if we are doing something wrong... |
It seems that the feign's compression won't work. My version is Spring Cloud Camden SR3.
Here goes my configuration.
application.properties
I found the compression won't work. When I debuged the feign service, I found that the code can never be loaded. like the pic below.
Then I go into the code, in
spring-cloud-netflix-core
In this line:
this class ApacheHttpClient, is in the jar
feign-httpclient
.but the dependency is even not in the classpath. Here goes my POM.XML
So, I added the denpency mannally.
BUT even I did this, Feign's compression can never work.
My Question
The text was updated successfully, but these errors were encountered: