/** * @param text * @return * @throws JMSException */ public TextMessage createTextMessage(String text) throws JMSException { return next.createTextMessage(text); }
/** * @return * @throws JMSException */ public TextMessage createTextMessage() throws JMSException { return next.createTextMessage(); }
/** * @return * @throws JMSException */ public TextMessage createTextMessage() throws JMSException { return next.createTextMessage(); }
/** * @param text * @return * @throws JMSException */ public TextMessage createTextMessage(String text) throws JMSException { return next.createTextMessage(text); }
/** * @return * @throws JMSException */ public TextMessage createTextMessage() throws JMSException { return next.createTextMessage(); }
/** * @param text * @return * @throws JMSException */ public TextMessage createTextMessage(String text) throws JMSException { return next.createTextMessage(text); }
/** * @see ca.uhn.hl7v2.protocol.impl.AbstractJMSTransport#getMessage() */ protected Message getMessage() throws JMSException { return mySendingSession.createTextMessage(); }
/** * @return * @throws JMSException */ public TextMessage createTextMessage() throws JMSException { return next.createTextMessage(); }
/** * @param text * @return * @throws JMSException */ public TextMessage createTextMessage(String text) throws JMSException { return next.createTextMessage(text); }
/** * @see ca.uhn.hl7v2.protocol.impl.AbstractJMSTransport#getMessage() */ protected Message getMessage() throws JMSException { return mySendingSession.createTextMessage(); }
/** * @see ca.uhn.hl7v2.protocol.JMSDestination#createMessage() */ public TextMessage createMessage() throws JMSException { return mySendingSession.createTextMessage(); }
/** * @see ca.uhn.hl7v2.protocol.JMSDestination#createMessage() */ public TextMessage createMessage() throws JMSException { return mySendingSession.createTextMessage(); }
/** * @return * @throws JMSException */ public TextMessage createTextMessage() throws JMSException { return next.createTextMessage(); }
/** * @param text * @return * @throws JMSException */ public TextMessage createTextMessage(String text) throws JMSException { return next.createTextMessage(text); }
protected Message createMessage(final Object event) throws JMSException { final String eventStr = event.toString(); if (useBytesMessage.get()) { final BytesMessage msg = session.createBytesMessage(); msg.writeBytes(eventStr.getBytes(UTF8)); return msg; } return session.createTextMessage(eventStr); } }
public void testJMSTextMessageWithSelector() throws Exception { JMSAdaptor adaptor = new JMSAdaptor(); adaptor.parseArgs(DATA_TYPE, "vm://localhost -t test.topic -s \"foo='bar'\"", AdaptorManager.NULL); adaptor.start("id", DATA_TYPE, 0, this); Message message = session.createTextMessage(MESSAGE_PAYLOAD); publisher.publish(message); message = session.createTextMessage(MESSAGE_PAYLOAD); message.setStringProperty("foo", "bar"); publisher.publish(message); synchronized(this) { wait(1000); } assertEquals("Message not received", 1, messagesReceived); }
public void testJMSTextMessage() throws Exception { JMSAdaptor adaptor = new JMSAdaptor(); adaptor.parseArgs(DATA_TYPE, "vm://localhost -t test.topic", AdaptorManager.NULL); adaptor.start("id", DATA_TYPE, 0, this); Message message = session.createTextMessage(MESSAGE_PAYLOAD); publisher.publish(message); synchronized(this) { wait(1000); } assertEquals("Message not received", 1, messagesReceived); }
public void testJMSTextMessageWithTransformer() throws Exception { JMSAdaptor adaptor = new JMSAdaptor(); adaptor.parseArgs(DATA_TYPE, "vm://localhost -t test.topic -x org.apache.hadoop.chukwa.datacollection.adaptor.jms.JMSTextMessageTransformer", AdaptorManager.NULL); adaptor.start("id", DATA_TYPE, 0, this); Message message = session.createTextMessage(MESSAGE_PAYLOAD); publisher.publish(message); synchronized(this) { wait(1000); } assertEquals("Message not received", 1, messagesReceived); }
public void testJMSPropMissingWithAllRequired() throws Exception { JMSAdaptor adaptor = new JMSAdaptor(); adaptor.parseArgs(DATA_TYPE, "vm://localhost -t test.topic " + "-x org.apache.hadoop.chukwa.datacollection.adaptor.jms.JMSMessagePropertyTransformer " + "-p \"foo,bar,num\"", AdaptorManager.NULL); adaptor.start("id", DATA_TYPE, 0, this); Message message = session.createTextMessage(MESSAGE_PAYLOAD); message.setStringProperty("bar", "bar_value"); message.setStringProperty("bat", "bat_value"); message.setIntProperty("num", 1); publisher.publish(message); synchronized(this) { wait(1000); } assertEquals("Message should not have been received", 0, chunkPayloads.size()); }
/** * Topics shouldn't hold on to messages if there are no subscribers */ @Test public void testPersistentMessagesForTopicDropped() throws Exception { TopicConnection topicConn = createTopicConnection(); TopicSession sess = topicConn.createTopicSession(true, 0); TopicPublisher pub = sess.createPublisher(ActiveMQServerTestCase.topic1); pub.setDeliveryMode(DeliveryMode.PERSISTENT); Message m = sess.createTextMessage("testing123"); pub.publish(m); sess.commit(); topicConn.close(); checkEmpty(ActiveMQServerTestCase.topic1); }