Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Decouple /monitor endpoint from Spring Cloud Bus #628

Open
asarkar opened this issue Feb 7, 2017 · 2 comments
Open

Decouple /monitor endpoint from Spring Cloud Bus #628

asarkar opened this issue Feb 7, 2017 · 2 comments

Comments

@asarkar
Copy link
Contributor

asarkar commented Feb 7, 2017

In my case, deploying and maintaining a queue for something that's very infrequent (dynamic updates) can't be justified. Instead, I'm choosing to use service discovery and Actuator /refresh endpoint to achieve this over HTTP.
The problem with the monitor endpoint is that it brings in the baggage of Spring Cloud Bus whether I want it or not. I can use the controller and the parsing of various events, but I want to choose how to react to the push notifications. Currently, this is not possible as the controller sends out a Spring Cloud Bus specific event after parsing the notification.

I propose one of the following:

  1. Either the controller hands over the set of services to some bean, that is conditionally created if not already provided by the user. You can have a SpringCloudBusAwareService by default and keep existing functionality, and I should be able to override that using my own implementation.
  2. Send a non-bus event and have some listener, if present, deal with it. Same as above, SpringCloudBusAwareListener can be provided by default.

Of course, the above only works if the endpoint doesn't pull in the Bus libraries, which in turn fail if no binder is present on the classpath.

@spencergibb
Copy link
Member

I think I'd prefer option 1.

@cforce
Copy link

cforce commented Jul 12, 2017

+1 for any more leightweight option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants