Search in sources :

Example 1 with CollectionJobListener

use of org.opennms.nrtg.nrtcollector.internal.jms.CollectionJobListener in project opennms by OpenNMS.

the class AppConfig method listenerContainer.

//
// JMS DLMC
//
@Bean(name = "listenerContainer")
public AbstractMessageListenerContainer listenerContainer() {
    DefaultMessageListenerContainer listenerContainer = new DefaultMessageListenerContainer();
    listenerContainer.setConnectionFactory(connectionFactory());
    listenerContainer.setConcurrentConsumers(16);
    listenerContainer.setMaxConcurrentConsumers(16);
    listenerContainer.setDestinationName("NrtCollectMe");
    listenerContainer.setMessageListener(new CollectionJobListener(jmsTemplate()));
    return listenerContainer;
}
Also used : DefaultMessageListenerContainer(org.springframework.jms.listener.DefaultMessageListenerContainer) CollectionJobListener(org.opennms.nrtg.nrtcollector.internal.jms.CollectionJobListener) Bean(org.springframework.context.annotation.Bean)

Example 2 with CollectionJobListener

use of org.opennms.nrtg.nrtcollector.internal.jms.CollectionJobListener in project opennms by OpenNMS.

the class AppConfig method listenerContainer.

//
// JMS DLMC
//
@Bean(name = "listenerContainer")
public AbstractMessageListenerContainer listenerContainer() {
    CollectionJobListener collectionJobListener = new CollectionJobListener(jmsTemplate());
    collectionJobListener.setProtocolCollectorRegistry(protocolCollectorRegistry());
    DefaultMessageListenerContainer listenerContainer = new DefaultMessageListenerContainer();
    listenerContainer.setConnectionFactory(connectionFactory());
    listenerContainer.setConcurrentConsumers(16);
    listenerContainer.setMaxConcurrentConsumers(16);
    listenerContainer.setDestinationName("NrtCollectMe");
    listenerContainer.setMessageListener(collectionJobListener);
    return listenerContainer;
}
Also used : DefaultMessageListenerContainer(org.springframework.jms.listener.DefaultMessageListenerContainer) CollectionJobListener(org.opennms.nrtg.nrtcollector.internal.jms.CollectionJobListener) Bean(org.springframework.context.annotation.Bean)

Aggregations

CollectionJobListener (org.opennms.nrtg.nrtcollector.internal.jms.CollectionJobListener)2 Bean (org.springframework.context.annotation.Bean)2 DefaultMessageListenerContainer (org.springframework.jms.listener.DefaultMessageListenerContainer)2