Example usage for org.springframework.jms.listener AbstractMessageListenerContainer setSubscriptionShared

List of usage examples for org.springframework.jms.listener AbstractMessageListenerContainer setSubscriptionShared

Introduction

In this page you can find the example usage for org.springframework.jms.listener AbstractMessageListenerContainer setSubscriptionShared.

Prototype

public void setSubscriptionShared(boolean subscriptionShared) 

Source Link

Document

Set whether to make the subscription shared.

Usage

From source file:org.bremersee.common.spring.autoconfigure.JmsListenerEndpointImpl.java

private void setupJmsListenerContainer(AbstractMessageListenerContainer listenerContainer) {
    if (getDestinationProperties() != null) {
        if (getDestinationProperties().getConcurrency() != null) {
            listenerContainer.setConcurrency(getDestinationProperties().getConcurrency());
        }/*from  ww w  .  j  a v a 2 s  .  c o m*/
        if (getDestinationProperties().getDestinationName() != null) {
            listenerContainer.setDestinationName(getDestinationProperties().getDestinationName());
        }
        listenerContainer.setPubSubDomain(getDestinationProperties().isPubSubDomain());
        listenerContainer.setPubSubNoLocal(getDestinationProperties().isPubSubNoLocal());
        listenerContainer.setSessionAcknowledgeMode(getDestinationProperties().getSessionAcknowledgeMode());
        listenerContainer.setSubscriptionDurable(destinationProperties.isSubscriptionDurable());
        if (getDestinationProperties().getSubscriptionName() != null) {
            listenerContainer.setSubscriptionName(getDestinationProperties().getSubscriptionName());
        }
        listenerContainer.setSubscriptionShared(getDestinationProperties().isSubscriptionShared());
    }
    if (getMessageSelector() != null) {
        listenerContainer.setMessageSelector(getMessageSelector());
    }
    setupMessageListener(listenerContainer);
}