use of org.springframework.jms.listener.SimpleMessageListenerContainer in project av-service by dvoraka.
the class JmsBridgeOutputConfig method outMessageListenerContainer.
@Bean
public SimpleMessageListenerContainer outMessageListenerContainer(ConnectionFactory outConnectionFactory, MessageListener outMessageListener) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(outConnectionFactory);
container.setDestinationName(resultDestination);
container.setMessageListener(outMessageListener);
return container;
}
use of org.springframework.jms.listener.SimpleMessageListenerContainer in project av-service by dvoraka.
the class JmsFileClientConfig method messageListenerContainer.
@Bean
public SimpleMessageListenerContainer messageListenerContainer(ConnectionFactory connectionFactory, MessageListener messageListener) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setDestinationName(resultDestination);
container.setMessageListener(messageListener);
return container;
}
use of org.springframework.jms.listener.SimpleMessageListenerContainer in project camel by apache.
the class JmsEndpointConfigurationTest method testCreateSimpleMessageListener.
@Test
public void testCreateSimpleMessageListener() throws Exception {
JmsEndpoint endpoint = resolveMandatoryEndpoint("jms:Foo.Bar?consumerType=Simple", JmsEndpoint.class);
JmsConsumer consumer = endpoint.createConsumer(dummyProcessor);
AbstractMessageListenerContainer container = consumer.getListenerContainer();
assertTrue("Should have been a SimpleMessageListenerContainer", container instanceof SimpleMessageListenerContainer);
}
use of org.springframework.jms.listener.SimpleMessageListenerContainer in project spring-framework by spring-projects.
the class JmsListenerContainerFactoryTests method createSimpleContainer.
@Test
public void createSimpleContainer() {
SimpleJmsListenerContainerFactory factory = new SimpleJmsListenerContainerFactory();
setDefaultJmsConfig(factory);
SimpleJmsListenerEndpoint endpoint = new SimpleJmsListenerEndpoint();
MessageListener messageListener = new MessageListenerAdapter();
endpoint.setMessageListener(messageListener);
endpoint.setDestination("myQueue");
SimpleMessageListenerContainer container = factory.createListenerContainer(endpoint);
assertDefaultJmsConfig(container);
assertEquals(messageListener, container.getMessageListener());
assertEquals("myQueue", container.getDestinationName());
}
use of org.springframework.jms.listener.SimpleMessageListenerContainer in project spring-framework by spring-projects.
the class MethodJmsListenerEndpointTests method processAndReplyWithSendToTopic.
@Test
public void processAndReplyWithSendToTopic() throws JMSException {
String methodName = "processAndReplyWithSendTo";
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setPubSubDomain(true);
MessagingMessageListenerAdapter listener = createInstance(this.factory, getListenerMethod(methodName, String.class), container);
processAndReplyWithSendTo(listener, "replyDestination", true);
assertListenerMethodInvocation(sample, methodName);
}
Aggregations