use of com.hazelcast.config.TopicConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method testTopicConfig_whenListenerConfigByClassName.
@Test
public void testTopicConfig_whenListenerConfigByClassName() {
TopicConfig topicConfig = new TopicConfig(name).setGlobalOrderingEnabled(false).setMultiThreadingEnabled(true).setStatisticsEnabled(true).addMessageListenerConfig(getListenerConfig_byClassName());
driver.getConfig().addTopicConfig(topicConfig);
assertConfigurationsEqualOnAllMembers(topicConfig);
}
use of com.hazelcast.config.TopicConfig in project hazelcast by hazelcast.
the class DynamicConfigSmokeTest method topic_initialSubmitTest.
@Test
public void topic_initialSubmitTest() {
String topicName = randomName();
String listenerClassName = randomName();
HazelcastInstance[] instances = members(DEFAULT_INITIAL_CLUSTER_SIZE);
HazelcastInstance driver = driver();
TopicConfig topicConfig = new TopicConfig(topicName);
topicConfig.addMessageListenerConfig(new ListenerConfig(listenerClassName));
driver.getConfig().addTopicConfig(topicConfig);
for (HazelcastInstance instance : instances) {
topicConfig = instance.getConfig().getTopicConfig(topicName);
assertEquals(listenerClassName, topicConfig.getMessageListenerConfigs().get(0).getClassName());
}
}
use of com.hazelcast.config.TopicConfig in project hazelcast by hazelcast.
the class DynamicConfigTest method testTopicConfig_whenListenerConfigByImplementation.
@Test
public void testTopicConfig_whenListenerConfigByImplementation() {
TopicConfig topicConfig = new TopicConfig(name).setGlobalOrderingEnabled(false).setMultiThreadingEnabled(true).setStatisticsEnabled(true).addMessageListenerConfig(getMessageListenerConfig_byImplementation());
driver.getConfig().addTopicConfig(topicConfig);
assertConfigurationsEqualOnAllMembers(topicConfig);
}
use of com.hazelcast.config.TopicConfig in project hazelcast by hazelcast.
the class AddTopicConfigMessageTask method checkStaticConfigDoesNotExist.
@Override
protected boolean checkStaticConfigDoesNotExist(IdentifiedDataSerializable config) {
DynamicConfigurationAwareConfig nodeConfig = (DynamicConfigurationAwareConfig) nodeEngine.getConfig();
TopicConfig topicConfig = (TopicConfig) config;
return nodeConfig.checkStaticConfigDoesNotExist(nodeConfig.getStaticConfig().getTopicConfigs(), topicConfig.getName(), topicConfig);
}
use of com.hazelcast.config.TopicConfig in project hazelcast by hazelcast.
the class TestFullApplicationContext method testTopicConfig.
@Test
public void testTopicConfig() {
TopicConfig testTopicConfig = config.getTopicConfig("testTopic");
assertNotNull(testTopicConfig);
assertEquals("testTopic", testTopicConfig.getName());
assertEquals(1, testTopicConfig.getMessageListenerConfigs().size());
assertTrue(testTopicConfig.isGlobalOrderingEnabled());
assertFalse(testTopicConfig.isStatisticsEnabled());
ListenerConfig listenerConfig = testTopicConfig.getMessageListenerConfigs().get(0);
assertEquals("com.hazelcast.spring.DummyMessageListener", listenerConfig.getClassName());
}
Aggregations