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

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

Introduction

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

Prototype

public void setPubSubNoLocal(boolean pubSubNoLocal) 

Source Link

Document

Set whether to inhibit the delivery of messages published by its own connection.

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 2s.c om*/
        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);
}