Example usage for javax.jms TopicSession createTextMessage

List of usage examples for javax.jms TopicSession createTextMessage

Introduction

In this page you can find the example usage for javax.jms TopicSession createTextMessage.

Prototype


TextMessage createTextMessage() throws JMSException;

Source Link

Document

Creates a TextMessage object.

Usage

From source file:org.apache.activemq.usecases.DurableSubscriptionHangTestCase.java

private void sendRandomMessage(TopicSession session, MessageProducer producer) throws JMSException {
    TextMessage textMessage = session.createTextMessage();
    textMessage.setText(RandomStringUtils.random(500, "abcdefghijklmnopqrstuvwxyz"));
    producer.send(textMessage);//from   www . ja  v  a 2 s. c  o  m
}