This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
void testServiceBusReceiverClient() throws Exception { | |
String connectionString = "xxxx"; | |
String topicName = "xxxxx"; | |
String subName = "xxxx"; | |
final ServiceBusReceiverClient client = new ServiceBusClientBuilder() | |
.connectionString(connectionString) | |
.receiver() | |
.topicName(topicName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HealthTemplate<T> implements HealthIndicator { | |
private final boolean resultAsValue; | |
private final Health.Builder health = Health.unknown(); | |
private final AtomicInteger numberOfExecutions = new AtomicInteger(0); | |
private final AtomicInteger numberOfErrors = new AtomicInteger(0); | |
private final AtomicLong callDuration = new AtomicLong(0L); | |
public HealthTemplate() { | |
resultAsValue = false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<sourceDirectory>src/app</sourceDirectory> | |
<resources> | |
<resource> | |
<directory>src</directory> | |
</resource> | |
<resource> | |
<directory>e2e</directory> | |
</resource> | |
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class HystrixConfig { | |
@Autowired | |
private Environment env; | |
@EventListener({ | |
ContextRefreshedEvent.class, // on spring start | |
EnvironmentChangeEvent.class // on configuration changes, requires spring-cloud | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class HystrixConfig { | |
@Bean | |
public ServletRegistrationBean<HystrixMetricsStreamServlet> hystrixStreamServlet(){ | |
return new ServletRegistrationBean<>(new HystrixMetricsStreamServlet(), "/hystrix.stream"); | |
} | |
} |