1 18 package org.apache.activemq.test.retroactive; 19 20 import org.apache.activemq.command.ActiveMQTopic; 21 22 import javax.jms.MessageProducer ; 23 import javax.jms.TextMessage ; 24 import javax.jms.JMSException ; 25 import javax.jms.MessageConsumer ; 26 27 31 public class RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest extends RetroactiveConsumerTestWithSimpleMessageListTest { 32 private int counter = 1; 33 34 protected void sendMessage(MessageProducer producer, TextMessage message) throws JMSException { 35 ActiveMQTopic topic = new ActiveMQTopic(destination.toString() + "." + (counter++)); 36 producer.send(topic, message); 38 } 39 40 protected MessageProducer createProducer() throws JMSException { 41 return session.createProducer(null); 42 } 43 44 protected MessageConsumer createConsumer() throws JMSException { 45 return session.createConsumer( new ActiveMQTopic(destination.toString() + ".>")); 46 } 47 48 protected String getBrokerXml() { 49 return "org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml"; 50 } 51 } 52 | Popular Tags |