/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
@Override public synchronized void start(final StartContext context) throws StartException { topic = ActiveMQJMSClient.createTopic(JMS_TOPIC_PREFIX + name); }
@Bean public Topic defaultTopic() { return ActiveMQJMSClient.createTopic(artemisProperties.getTopic()); }
@Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } });
/** * Factory method to create new Topic instances */ protected Topic createTopic(String name) { return ActiveMQJMSClient.createTopic(name); }
ConsumerThread(final ConnectionFactory cf, final int numMessages) throws Exception { connection = cf.createConnection(); connection.start(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); consumer = session.createConsumer(ActiveMQJMSClient.createTopic("my-topic")); this.numMessages = numMessages; }
ProducerThread(final ConnectionFactory cf, final int numMessages) throws Exception { connection = cf.createConnection(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); producer = session.createProducer(ActiveMQJMSClient.createTopic("my-topic")); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); this.numMessages = numMessages; }
@Test public void testSharedDurableConsumer() throws Exception { conn = cf.createConnection(); conn.start(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); topic = ActiveMQJMSClient.createTopic(T_NAME); MessageConsumer cons = session.createSharedDurableConsumer(topic, "test1"); MessageProducer producer = session.createProducer(topic); producer.send(session.createTextMessage("test")); TextMessage txt = (TextMessage) cons.receive(5000); Assert.assertNotNull(txt); }
@Test public void testSharedConsumer() throws Exception { conn = cf.createConnection(); conn.start(); Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); topic = ActiveMQJMSClient.createTopic(T_NAME); MessageConsumer cons = session.createSharedConsumer(topic, "test1"); MessageProducer producer = session.createProducer(topic); producer.send(session.createTextMessage("test")); TextMessage txt = (TextMessage) cons.receive(5000); Assert.assertNotNull(txt); }
@Test public void testAutoCreateOnSendToTopic() throws Exception { Connection connection = cf.createConnection(); Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); javax.jms.Topic topic = ActiveMQJMSClient.createTopic(QUEUE_NAME); MessageProducer producer = session.createProducer(topic); producer.send(session.createTextMessage("msg")); connection.close(); assertNotNull(server.getManagementService().getResource(ResourceNames.ADDRESS + "test")); }
@Override @Before public void setUp() throws Exception { super.setUp(); topic = ActiveMQJMSClient.createTopic(T_NAME); topic2 = ActiveMQJMSClient.createTopic(T2_NAME); jmsServer.createQueue(false, JmsConsumerTest.Q_NAME, null, true, JmsConsumerTest.Q_NAME); jmsServer.createTopic(true, T_NAME, "/topic/" + T_NAME); jmsServer.createTopic(true, T2_NAME, "/topic/" + T2_NAME); cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); }