No description, website, or topics provided.
Switch branches/tags
Clone or download


Semaphore CI License

SmallRye Rest Client

SmallRye Rest Client is an implementation of Eclipse MicroProfile Rest Client.


To build simply run

$ mvn clean install

Project Structure

  • docs - project documentation

  • implementation - produces implementation artifact

  • testsuite

    • basic - basic testsuite, tests functionalities which are not covered by the TCK

    • common - test utils shared accross all test suites

    • tck - TCK runner

Non-portable Features

CDI Interceptors Support

In general, Rest Client proxies are not created by the CDI container and therefore method invocations do not pass through CDI interceptors. In SmallRye, however, you can associate business method interceptors (denoted by the @AroundInvoke annotation) with a Rest Client proxy by using interceptor bindings. The primary use case is the support of MicroProfile Fault Tolerance annotations, for example:

import org.eclipse.microprofile.faulttolerance.Retry;

interface MyClient {

    @Retry(maxRetries = 3) // Retry on any exception thrown
    String hello();
The org.eclipse.microprofile.faulttolerance.Asynchronous annotation is currently not supported because the underlying RESTEasy client is not able to handle the java.util.concurrent.Future return types.


In addition to the MicroProfile Rest Client specification, every Rest Client proxy implements io.smallrye.restclient.RestClientProxy interface which allows you to:

  • obtain the underlying instance

  • release all associated resources, for example:

public void hello() {
   MyClient myClient = RestClientBuilder.newBuilder().build(MyClient.class);
   // Finally release all associated resources
   ((RestClientProxy) helloClient).close();