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

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

Introduction

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

Prototype

public void setSubscriptionName(@Nullable String subscriptionName) 

Source Link

Document

Set the name of a subscription to create.

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  w w  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);
}