You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-cloud-tencent/spring-cloud-tencent-examples/polaris-circuitbreaker-example
Haotian Zhang 97f5ec54d0
feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991)
2 years ago
..
polaris-circuitbreaker-callee-service feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991) 2 years ago
polaris-circuitbreaker-callee-service2 feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991) 2 years ago
polaris-circuitbreaker-feign-example feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991) 2 years ago
polaris-circuitbreaker-gateway-example feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991) 2 years ago
polaris-circuitbreaker-resttemplate-example feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991) 2 years ago
polaris-circuitbreaker-webclient-example feat:Remove error log from `DecodeTransferMetadataReactiveFilter`. (#991) 2 years ago
README-zh.md Documentation content changes: add circuitbreaker readme (#931) 2 years ago
README.md Documentation content changes: add circuitbreaker readme (#931) 2 years ago
pom.xml feature:add polaris circuit breaker support (#882) 2 years ago

README.md

Spring Cloud Polaris Circuitbreaker example

Example Introduction

This example shows how to usespring-cloud-starter-tencent-polaris-circuitbreakerin Spring Cloud project for its features.

This example contains callee-servicepolaris-circuitbreaker-callee-servicepolaris-circuitbreaker-callee-service2and caller-servicepolaris-circuitbreaker-feign-examplepolaris-circuitbreaker-gateway-examplepolaris-circuitbreaker-webclient-example.

Instruction

Configuration

The configuration is as the following shows. {ip} and {port} are Polaris backend IP address and port number.

spring:
  application:
    name: ${application.name}
  cloud:
    polaris:
      address: ${ip}:${port}

Launching Example

Launching Polaris Backend Service

Reference to Polaris Getting Started

Launching callee service

Launchingpolaris-circuitbreaker-example/polaris-circuitbreaker-callee-servicepolaris-circuitbreaker-example/polaris-circuitbreaker-callee-service2

Launching caller service

Launching Feign and Verify

Launchingpolaris-circuitbreaker-example/polaris-circuitbreaker-feign-example.

Sending requestcurl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromPolaris', Verify circuit breaker and fallback from Polaris-server.

Sending requestcurl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromCode', Verify circuit breaker and fallback from code.

Launching RestTemplate and Verify

Launchingpolaris-circuitbreaker-example/polaris-circuitbreaker-resttemplate-example.

Sending requestcurl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromPolaris', Verify circuit breaker and fallback from Polaris-server.

Sending requestcurl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo/fallbackFromCode', Verify circuit breaker and fallback from code.

Launching WebClient and Verify

Launchingpolaris-circuitbreaker-example/polaris-circuitbreaker-webclient-example

Sending requestcurl --location --request GET 'http://127.0.0.1:48080/example/service/a/getBServiceInfo', Verify circuit breaker and fallback from code.

Launching SCG and Verify

Launchingpolaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example

Sending requestcurl --location --request GET 'http://127.0.0.1:48080/polaris-circuitbreaker-callee-service/example/service/b/info', Verify circuit breaker and fallback from code.

Changingpolaris-circuitbreaker-example/polaris-circuitbreaker-gateway-example/resources/bootstrap.yml, delete local fallback and restart, Verify circuit breaker and fallback from Polaris-server.