Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Support For Reactive Bulkheads #166

Open
ryanjbaxter opened this issue Mar 15, 2023 · 5 comments
Open

Add Support For Reactive Bulkheads #166

ryanjbaxter opened this issue Mar 15, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@ryanjbaxter
Copy link
Contributor

https://resilience4j.readme.io/docs/examples-1#decorate-mono-or-flux-with-a-bulkhead

@ryanjbaxter ryanjbaxter added the enhancement New feature or request label Mar 15, 2023
@omernaci
Copy link

omernaci commented May 5, 2023

Hi @ryanjbaxter, I checked the link you shared.

I made an implementation for Mono in the Resilience4jBulkheadProvider class as follows. (I will do similar development in Flux)
According to your comment, I can move forward on this task.

	public <T> Mono<T> decorateMono(String id, Map<String, String> tags, Mono<T> mono) {
		Resilience4jBulkheadConfigurationBuilder.BulkheadConfiguration configuration = configurations
				.computeIfAbsent(id, defaultConfiguration);
		Bulkhead bulkhead = getOrCreateBulkhead(id, configuration.getBulkheadConfig(), tags);
		return mono.transformDeferred(BulkheadOperator.of(bulkhead));
	}

@ryanjbaxter
Copy link
Contributor Author

Sure PRs always welcome

@omernaci
Copy link

omernaci commented May 7, 2023

Hi @ryanjbaxter,
The purpose of this annotation@ClassPathExclusions is an decoupling used to prevent conflicts between classes and to start the application faster? Resilience4JAutoConfigurationWithoutMetricsTest class contains the following "reactor-core-*.jar" definition for exclusion. Will removing "reactor-core-*.jar" parameter cause any side effect in the project?

@ryanjbaxter
Copy link
Contributor Author

Its hard for me to say for sure as to why it is there. Likely to exclude some classes related to micrometer to make sure we are not depending on them and the autoconfiguration classes work properly. You can remove it and see if the test still works.

@emilnkrastev
Copy link

When can we expect the support for Reactive Bulkheads?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants