Java Code Examples for org.springframework.jms.config.DefaultJmsListenerContainerFactory#setPubSubDomain()
The following examples show how to use
org.springframework.jms.config.DefaultJmsListenerContainerFactory#setPubSubDomain() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ActiveMQConfig.java From hdw-dubbo with Apache License 2.0 | 5 votes |
@Bean(name = "topicJmsListenerContainerFactory") public JmsListenerContainerFactory<?> topicJmsListenerContainerFactory() { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory.setPubSubDomain(true); factory.setConnectionFactory(cachingConnectionFactory()); return factory; }
Example 2
Source File: ActiveMQConfig.java From hdw-dubbo with Apache License 2.0 | 5 votes |
@Bean(name = "queueJmsListenerContainerFactory") public JmsListenerContainerFactory<?> queueJmsListenerContainerFactory() { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory.setPubSubDomain(false); factory.setConnectionFactory(cachingConnectionFactory()); return factory; }
Example 3
Source File: BootStrap.java From MyBlog with Apache License 2.0 | 5 votes |
@Bean("topicFactory") public DefaultJmsListenerContainerFactory topicFactory( DefaultJmsListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); configurer.configure(factory, connectionFactory); factory.setPubSubDomain(true); return factory; }
Example 4
Source File: JmsConfig.java From myth with Apache License 2.0 | 5 votes |
/** * Jms listener container queue jms listener container factory. * * @param activeMQConnectionFactory the active mq connection factory * @return the jms listener container factory */ @Bean(name = "queueListenerContainerFactory") @ConditionalOnProperty(prefix = "spring.activemq", name = "broker-url") public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory activeMQConnectionFactory) { DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); bean.setConnectionFactory(activeMQConnectionFactory); bean.setPubSubDomain(Boolean.FALSE); return bean; }
Example 5
Source File: JmsConfig.java From myth with Apache License 2.0 | 5 votes |
/** * Jms listener container queue jms listener container factory. * * @param activeMQConnectionFactory the active mq connection factory * @return the jms listener container factory */ @Bean(name = "queueListenerContainerFactory") @ConditionalOnProperty(prefix = "spring.activemq", name = "broker-url") public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory activeMQConnectionFactory) { DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); bean.setConnectionFactory(activeMQConnectionFactory); bean.setPubSubDomain(Boolean.FALSE); return bean; }
Example 6
Source File: JmsConfig.java From myth with Apache License 2.0 | 5 votes |
@Bean(name = "queueListenerContainerFactory") @ConditionalOnProperty(prefix = "spring.activemq", name = "broker-url") public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory activeMQConnectionFactory) { DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); bean.setConnectionFactory(activeMQConnectionFactory); bean.setPubSubDomain(Boolean.FALSE); return bean; }
Example 7
Source File: JmsConfig.java From myth with Apache License 2.0 | 5 votes |
/** * Jms listener container queue jms listener container factory. * * @param activeMQConnectionFactory the active mq connection factory * @return the jms listener container factory */ @Bean(name = "queueListenerContainerFactory") @ConditionalOnProperty(prefix = "spring.activemq", name = "broker-url") public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory activeMQConnectionFactory) { DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); bean.setConnectionFactory(activeMQConnectionFactory); bean.setPubSubDomain(Boolean.FALSE); return bean; }
Example 8
Source File: JmsConfig.java From myth with Apache License 2.0 | 5 votes |
/** * Jms listener container queue jms listener container factory. * * @param activeMQConnectionFactory the active mq connection factory * @return the jms listener container factory */ @Bean(name = "queueListenerContainerFactory") @ConditionalOnProperty(prefix = "spring.activemq", name = "broker-url") public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory activeMQConnectionFactory) { DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); bean.setConnectionFactory(activeMQConnectionFactory); bean.setPubSubDomain(Boolean.FALSE); return bean; }
Example 9
Source File: JmsConfig.java From myth with Apache License 2.0 | 5 votes |
/** * Jms listener container queue jms listener container factory. * * @param activeMQConnectionFactory the active mq connection factory * @return the jms listener container factory */ @Bean(name = "queueListenerContainerFactory") @ConditionalOnProperty(prefix = "spring.activemq", name = "broker-url") public JmsListenerContainerFactory<?> jmsListenerContainerQueue(ConnectionFactory activeMQConnectionFactory) { DefaultJmsListenerContainerFactory bean = new DefaultJmsListenerContainerFactory(); bean.setConnectionFactory(activeMQConnectionFactory); bean.setPubSubDomain(Boolean.FALSE); return bean; }
Example 10
Source File: ReceiverConfig.java From spring-jms with MIT License | 5 votes |
@Bean public DefaultJmsListenerContainerFactory jmsListenerContainerFactory() { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory .setConnectionFactory(receiverActiveMQConnectionFactory()); factory.setPubSubDomain(true); return factory; }
Example 11
Source File: EventRegistryJmsConfiguration.java From flowable-engine with Apache License 2.0 | 5 votes |
@Bean public DefaultJmsListenerContainerFactory jmsListenerContainerFactory(ConnectionFactory connectionFactory) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory.setConnectionFactory(connectionFactory); // configuration properties are Spring Boot defaults factory.setPubSubDomain(false); factory.setSessionTransacted(true); factory.setAutoStartup(true); factory.setReceiveTimeout(Duration.ofSeconds(1).toMillis()); return factory; }
Example 12
Source File: ArtemisConfig.java From dhis2-core with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Bean // configured for topics public DefaultJmsListenerContainerFactory jmsListenerContainerFactory( ConnectionFactory connectionFactory, NameDestinationResolver nameDestinationResolver ) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory.setConnectionFactory( connectionFactory ); factory.setDestinationResolver( nameDestinationResolver ); // set to true, since we only use topics and we want to resolve names to topic destination factory.setPubSubDomain( true ); // 1 forces the listener to use only one consumer, to avoid duplicated messages factory.setConcurrency( "1" ); return factory; }
Example 13
Source File: ArtemisConfig.java From dhis2-core with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Bean // configured for queues public DefaultJmsListenerContainerFactory jmsQueueListenerContainerFactory( ConnectionFactory connectionFactory, NameDestinationResolver nameDestinationResolver ) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory.setConnectionFactory( connectionFactory ); factory.setDestinationResolver( nameDestinationResolver ); factory.setPubSubDomain( false ); factory.setConcurrency( "5-10" ); return factory; }
Example 14
Source File: ActivemqConfiguration.java From onetwo with Apache License 2.0 | 5 votes |
@Bean(name=ContainerFactorys.QUEUE) public DefaultJmsListenerContainerFactory queueListenerContainerFactory( DefaultJmsListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); configurer.configure(factory, connectionFactory); factory.setPubSubDomain(false); return factory; }
Example 15
Source File: ActivemqConfiguration.java From onetwo with Apache License 2.0 | 5 votes |
@Bean(name=ContainerFactorys.TOPIC) public DefaultJmsListenerContainerFactory topicListenerContainerFactory( DefaultJmsListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory) { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); configurer.configure(factory, connectionFactory); factory.setPubSubDomain(true); return factory; }