use of org.apache.activemq.command.ActiveMQTextMessage in project activemq-artemis by apache.
the class ActiveMQTextMessageTest method populateObject.
@Override
protected void populateObject(Object object) throws Exception {
super.populateObject(object);
ActiveMQTextMessage info = (ActiveMQTextMessage) object;
}
use of org.apache.activemq.command.ActiveMQTextMessage in project activemq-artemis by apache.
the class ActiveMQTextMessageTest method createObject.
@Override
public Object createObject() throws Exception {
ActiveMQTextMessage info = new ActiveMQTextMessage();
populateObject(info);
return info;
}
use of org.apache.activemq.command.ActiveMQTextMessage in project activemq-artemis by apache.
the class ActiveMQTextMessageTest method populateObject.
@Override
protected void populateObject(Object object) throws Exception {
super.populateObject(object);
ActiveMQTextMessage info = (ActiveMQTextMessage) object;
}
use of org.apache.activemq.command.ActiveMQTextMessage in project activemq-artemis by apache.
the class TopicClusterTest method testSendReceive.
@Test
public void testSendReceive() throws Exception {
for (int i = 0; i < MESSAGE_COUNT; i++) {
TextMessage textMessage = new ActiveMQTextMessage();
textMessage.setText("MSG-NO:" + i);
for (int x = 0; x < producers.length; x++) {
producers[x].send(textMessage);
}
}
synchronized (receivedMessageCount) {
while (receivedMessageCount.get() < expectedReceiveCount()) {
receivedMessageCount.wait(20000);
}
}
// sleep a little - to check we don't get too many messages
Thread.sleep(2000);
LOG.info("GOT: " + receivedMessageCount.get() + " Expected: " + expectedReceiveCount());
Assert.assertEquals("Expected message count not correct", expectedReceiveCount(), receivedMessageCount.get());
}
use of org.apache.activemq.command.ActiveMQTextMessage in project activemq-artemis by apache.
the class FailoverTransportBrokerTest method createMessage.
protected Message createMessage(ProducerInfo producerInfo, ActiveMQDestination destination) {
ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setMessageId(new MessageId(producerInfo, ++msgIdGenerator));
message.setDestination(destination);
message.setPersistent(false);
try {
message.setText("Test Message Payload.");
} catch (MessageNotWriteableException e) {
}
return message;
}
Aggregations