-
Notifications
You must be signed in to change notification settings - Fork 604
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
Channel proxies direct binding #113
Channel proxies direct binding #113
Conversation
@@ -71,4 +71,15 @@ public void run(String... args) throws Exception { | |||
} | |||
return requests; | |||
} | |||
|
|||
private String[] filterSpringProperties(String[] args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is yet to be used ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops.
Pushed a few changes, removing |
|
||
@Override | ||
public void start() { | ||
if (!running) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think running needs to be volatile for this to be safe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or a final AtomicBoolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it's volatile already.
for (String mainClass : mainClassNames) { | ||
mainClasses.add(ClassUtils.forName(mainClass, classLoader)); | ||
} | ||
Runnable moduleAggregatorRunner = new Runnable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
factoring the Runnable to an inner class would improve readability
- Remove DirectChannelProxyFactory; - Proxies create channels as necessary, including support for PollableChannels; - Channel beans are using the bean factory methods for the proxies; - Coordinate bind/unbind across a context through the internal Bindable interface; - Add support for embedding modules as independent child contexts of the main module, wrapped in a Bindable interface; - Add support for channel name namespacing; - Use a shared channel registry (consulted by the proxies) to create direct bindings;
- Removing BindableChannelWrapper and UnbindOnCloseApplicationListener and relying on ChannelBindingListener solely; - Some code cleanup Further simplifications
Currently, the following possible improvements have been identified, to be addressed as part of future work:
|
38e1b78
to
ace6551
Compare
rebased, squashed and merged as bd47560 |
Test by installing spring-cloud-stream and spring-cloud-stream-modules and then running similar to
java -jar spring-cloud-stream-module-launcher/target/spring-cloud-stream-module-launcher-1.0.0.BUILD-SNAPSHOT.jar --modules=org.springframework.cloud.stream.module:time-source:1.0.0.BUILD-SNAPSHOT,org.springframework.cloud.stream.module:filter-processor:1.0.0.BUILD-SNAPSHOT,org.springframework.cloud.stream.module:filter-processor:1.0.0.BUILD-SNAPSHOT --args.0.fixedDelay=7 --args.1.expression='payload.contains("6")' --aggregate=true --spring.cloud.stream.bindings.output=filtered
Note that the target queue should be 'filtered' and that the module parameters are applied correctly