INT-3545: Don't AutoStart HeaderChannelRegistry
JIRA: https://jira.spring.io/browse/INT-3545 Previously, the `DefaultHeaderChannelRegistry` was auto-started. This caused the reaper to run and eventually start all the `taskScheduler` threads, even if the registry was not being used. - Defer the `start()` until the first channel is stored. - Do not start the reaper if the bean has been explicitly stopped. - Deprecate the implementation of `SmartLifecycle`.
This commit is contained in:
@@ -210,7 +210,6 @@ public class HeaderChannelRegistryTests {
|
||||
public void testExpire() throws Exception {
|
||||
DefaultHeaderChannelRegistry registry = new DefaultHeaderChannelRegistry(50);
|
||||
registry.setTaskScheduler(this.taskScheduler);
|
||||
registry.start();
|
||||
String id = (String) registry.channelToChannelName(new DirectChannel());
|
||||
int n = 0;
|
||||
while (n++ < 100 && registry.channelNameToChannel(id) != null) {
|
||||
|
||||
Reference in New Issue
Block a user