1 18 package org.apache.activemq.broker.ft; 19 20 import javax.jms.Connection ; 21 import javax.jms.Destination ; 22 import javax.jms.JMSException ; 23 import javax.jms.MessageConsumer ; 24 import javax.jms.Session ; 25 import javax.jms.Topic ; 26 30 public class TopicMasterSlaveTest extends QueueMasterSlaveTest{ 31 32 protected boolean isTopic(){ 33 return true; 34 } 35 36 protected MessageConsumer createConsumer(Session session,Destination dest) throws JMSException { 37 return session.createDurableSubscriber((Topic ) dest,dest.toString()); 38 } 39 40 protected Connection createReceiveConnection() throws Exception { 41 Connection result=super.createReceiveConnection(); 42 result.setClientID(getClass().getName()); 43 return result; 44 } 45 } 46 | Popular Tags |