use of org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry in project spring-framework by spring-projects.
the class MessageBrokerConfigurationTests method customPathMatcher.
@Test
public void customPathMatcher() {
SimpleBrokerMessageHandler broker = this.customContext.getBean(SimpleBrokerMessageHandler.class);
DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry();
assertEquals("a.a", registry.getPathMatcher().combine("a", "a"));
SimpAnnotationMethodMessageHandler handler = this.customContext.getBean(SimpAnnotationMethodMessageHandler.class);
assertEquals("a.a", handler.getPathMatcher().combine("a", "a"));
DefaultUserDestinationResolver resolver = this.customContext.getBean(DefaultUserDestinationResolver.class);
assertNotNull(resolver);
assertEquals(false, new DirectFieldAccessor(resolver).getPropertyValue("keepLeadingSlash"));
}
use of org.springframework.messaging.simp.broker.DefaultSubscriptionRegistry in project spring-framework by spring-projects.
the class MessageBrokerConfigurationTests method customCacheLimit.
@Test
public void customCacheLimit() {
SimpleBrokerMessageHandler broker = this.customContext.getBean(SimpleBrokerMessageHandler.class);
DefaultSubscriptionRegistry registry = (DefaultSubscriptionRegistry) broker.getSubscriptionRegistry();
assertEquals(8192, registry.getCacheLimit());
}
Aggregations