Search in sources :

Example 1 with JmsConsumerImpl

use of com.adaptris.core.jms.JmsConsumerImpl in project interlok by adaptris.

the class ActiveMqJmsTransactedWorkflowTest method createWorkflow.

private JmsTransactedWorkflow createWorkflow(boolean isPtp, String threadName, String target) throws CoreException {
    JmsTransactedWorkflow workflow = new JmsTransactedWorkflow();
    workflow.setWaitPeriodAfterRollback(new TimeInterval(10L, TimeUnit.MILLISECONDS.name()));
    workflow.setProducer(new MockMessageProducer());
    JmsConsumerImpl jmsCons = isPtp ? new PtpConsumer().withQueue(target) : new PasConsumer().withTopic(target);
    jmsCons.setMessageTranslator(new TextMessageTranslator().withMoveJmsHeaders(true));
    workflow.setConsumer(jmsCons);
    return workflow;
}
Also used : PtpConsumer(com.adaptris.core.jms.PtpConsumer) TimeInterval(com.adaptris.util.TimeInterval) MockMessageProducer(com.adaptris.core.stubs.MockMessageProducer) PasConsumer(com.adaptris.core.jms.PasConsumer) TextMessageTranslator(com.adaptris.core.jms.TextMessageTranslator) JmsTransactedWorkflow(com.adaptris.core.jms.JmsTransactedWorkflow) JmsConsumerImpl(com.adaptris.core.jms.JmsConsumerImpl)

Aggregations

JmsConsumerImpl (com.adaptris.core.jms.JmsConsumerImpl)1 JmsTransactedWorkflow (com.adaptris.core.jms.JmsTransactedWorkflow)1 PasConsumer (com.adaptris.core.jms.PasConsumer)1 PtpConsumer (com.adaptris.core.jms.PtpConsumer)1 TextMessageTranslator (com.adaptris.core.jms.TextMessageTranslator)1 MockMessageProducer (com.adaptris.core.stubs.MockMessageProducer)1 TimeInterval (com.adaptris.util.TimeInterval)1