use of org.apache.activemq.ActiveMQMessageProducer in project activemq-artemis by apache.
the class CompressedInteropTest method sendCompressedTextMessageUsingOpenWire.
private void sendCompressedTextMessageUsingOpenWire() throws Exception {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
ActiveMQDestination destination = createDestination(session, ActiveMQDestination.QUEUE_TYPE);
final ActiveMQMessageProducer producer = (ActiveMQMessageProducer) session.createProducer(destination);
TextMessage textMessage = session.createTextMessage(TEXT);
producer.send(textMessage);
}
use of org.apache.activemq.ActiveMQMessageProducer in project activemq-artemis by apache.
the class CompressedInteropTest method sendCompressedObjectMessageUsingOpenWire.
private void sendCompressedObjectMessageUsingOpenWire() throws Exception {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
ActiveMQDestination destination = createDestination(session, ActiveMQDestination.QUEUE_TYPE);
final ActiveMQMessageProducer producer = (ActiveMQMessageProducer) session.createProducer(destination);
ObjectMessage objectMessage = session.createObjectMessage();
objectMessage.setObject(TEXT);
producer.send(objectMessage);
}
Aggregations