Giter Site home page Giter Site logo

aatarasoff / spring-thrift-starter Goto Github PK

View Code? Open in Web Editor NEW
162.0 24.0 67.0 437 KB

Set of cool annotations that helps you building Thrift applications with Spring Boot

License: MIT License

Java 100.00%
spring spring-boot spring-cloud-starter thrift spring-cloud

spring-thrift-starter's Issues

Add hystrix support

Add optional hystrix wrapper around thrift service calls.
It'll be great if optional toObservable() method will exists during compile time (dont know how to implement in java, analogue of mixin in groovy and scala).

LoggingThriftMethodInterceptor exception wrapping

Hi! I see that LoggingThriftMethodInterceptor wraps any exception into a TApplicationException in afterThrowing(), TApplicationException being a checked exception. I did a small refactoring of that class and have just left this code as it was. But now it's bothering me. If my callee code results in some runtime exception, the exception chain gets ugly: SomeRuntimeException -> TApplicationException -> java.lang.reflect.UndeclaredThrowableException: null (!) -> org.apache.thrift.transport.TTransportException: HTTP Response code: 406

Maybe it's worth changing the exception type to some runtime exception subclass? The problem is, all libthrift exceptions are checked.

New client bean registration logic doesn't work

Here you register bean with name, which is generated by getBeanName method.
But later get bean from context by simple type name.
This two names are different, that's why you don't use registered bean and anyway go to else case.
It brakes mocking client bean

NullPointerException in TLoadBalancerClient

Exception occurs when there is no service with such name in service registry.
Here:

HttpURLConnection iox = 
    (HttpURLConnection) new URL(this.loadBalancerClient.choose(serviceName)
        .getUri().toString() + path).openConnection();

loadBalancerClient.choose(serviceName) returns null.

https://github.com/aatarasoff/spring-thrift-starter/blob/60bab1f92fca926ade509a36961a468a62f4d3df/autoconfigure/src/main/java/info/developerblog/spring/thrift/transport/TLoadBalancerClient.java

Still maintained?

Is this package still maintained?

We are looking into using something similar but would like to extend e.g. the collected metrics and I was curious if it made sense to trying to contribute or if simply forking might be the easier option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.