Example usage for org.springframework.jms.listener DefaultMessageListenerContainer setDestination

List of usage examples for org.springframework.jms.listener DefaultMessageListenerContainer setDestination

Introduction

In this page you can find the example usage for org.springframework.jms.listener DefaultMessageListenerContainer setDestination.

Prototype

public void setDestination(@Nullable Destination destination) 

Source Link

Document

Set the destination to receive messages from.

Usage

From source file:com.alliander.osgp.acceptancetests.config.messaging.DomainCoreMessagingConfig.java

@Bean(name = "domainCoreIncomingRequestsMessageListenerContainer")
public DefaultMessageListenerContainer commonWsRequestsMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.commonWsRequestsQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.webServiceRequestMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.DomainCoreMessagingConfig.java

@Bean(name = "domainCoreIncomingOsgpCoreResponsesMessageListenerContainer")
public DefaultMessageListenerContainer osgpCoreResponsesMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.osgpCoreResponsesQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.osgpCoreResponseMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.DomainCoreMessagingConfig.java

@Bean(name = "domainCoreIncomingOsgpCoreRequestsMessageListenerContainer")
public DefaultMessageListenerContainer osgpCoreRequestsIncomingMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.osgpCoreRequestsIncomingQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.osgpCoreRequestMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.DomainPublicLightingMessagingConfig.java

@Bean(name = "domainPublicLightingIncomingWebServiceRequestsMessageListenerContainer")
public DefaultMessageListenerContainer incomingWebServiceRequestsMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.incomingWebServiceRequestsQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.incomingWebServiceRequestMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.DomainPublicLightingMessagingConfig.java

@Bean(name = "domainPublicLightingIncomingOsgpCoreResponsesMessageListenerContainer")
public DefaultMessageListenerContainer incomingOsgpCoreResponsesMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.incomingOsgpCoreResponsesQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.incomingOsgpCoreResponseMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.DomainPublicLightingMessagingConfig.java

@Bean(name = "domainPublicLightingIncomingOsgpCoreRequestsMessageListenerContainer")
public DefaultMessageListenerContainer incomingOsgpCoreRequestsMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.incomingOsgpCoreRequestsQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.incomingOsgpCoreRequestMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.OsgpCoreMessagingConfig.java

@Bean
public DefaultMessageListenerContainer protocolLogItemRequestsMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.protocolLogItemRequestsQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.protocolLogItemRequestMessageListener());
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.signing.server.application.config.MessagingConfig.java

@Bean
public DefaultMessageListenerContainer requestsMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(this.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.requestsQueue());
    messageListenerContainer.setConcurrentConsumers(Integer.parseInt(this.environment
            .getRequiredProperty(PROPERTY_NAME_JMS_SIGNING_SERVER_REQUESTS_CONCURRENT_CONSUMERS)));
    messageListenerContainer.setMaxConcurrentConsumers(Integer.parseInt(this.environment
            .getRequiredProperty(PROPERTY_NAME_JMS_SIGNING_SERVER_REQUESTS_MAX_CONCURRENT_CONSUMERS)));
    messageListenerContainer.setMessageListener(this.requestsMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.ProtocolOslpMessagingConfig.java

@Bean
public DefaultMessageListenerContainer osgpResponsesMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.osgpResponsesQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.osgpResponseMessageListener());
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}

From source file:com.alliander.osgp.acceptancetests.config.messaging.ProtocolOslpMessagingConfig.java

@Bean
public DefaultMessageListenerContainer signingResponsesMessageListenerContainer() {
    final DefaultMessageListenerContainer messageListenerContainer = new DefaultMessageListenerContainer();
    messageListenerContainer.setConnectionFactory(MessagingConfig.pooledConnectionFactory());
    messageListenerContainer.setDestination(this.replyToQueue());
    messageListenerContainer.setConcurrentConsumers(MessagingConfig.CONCURRENT_CONSUMERS);
    messageListenerContainer.setMaxConcurrentConsumers(MessagingConfig.MAX_CONCURRENT_CONSUMERS);
    messageListenerContainer.setMessageListener(this.signingServerResponsesMessageListener);
    messageListenerContainer.setSessionTransacted(true);
    return messageListenerContainer;
}