use of org.apache.activemq.spring.SpringConsumer in project activemq-artemis by apache.
the class ZeroPrefetchConsumerTest method testCannotUseMessageListener.
public void testCannotUseMessageListener() throws Exception {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(queue);
MessageListener listener = new SpringConsumer();
try {
consumer.setMessageListener(listener);
fail("Should have thrown JMSException as we cannot use MessageListener with zero prefetch");
} catch (JMSException e) {
LOG.info("Received expected exception : " + e);
}
}
use of org.apache.activemq.spring.SpringConsumer in project activemq by apache.
the class ZeroPrefetchConsumerTest method testCannotUseMessageListener.
public void testCannotUseMessageListener() throws Exception {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageConsumer consumer = session.createConsumer(queue);
MessageListener listener = new SpringConsumer();
try {
consumer.setMessageListener(listener);
fail("Should have thrown JMSException as we cannot use MessageListener with zero prefetch");
} catch (JMSException e) {
LOG.info("Received expected exception : " + e);
}
}
Aggregations