Tabnine Logo
TextMessage.setJMSDestination
Code IndexAdd Tabnine to your IDE (free)

How to use
setJMSDestination
method
in
javax.jms.TextMessage

Best Java code snippets using javax.jms.TextMessage.setJMSDestination (Showing top 2 results out of 315)

origin: mpilone/hazelcastmq

private void handleRequest(Session session, MessageConsumer consumer,
  MessageProducer producer) throws JMSException {
 TextMessage msg = (TextMessage) consumer.receive(1000);
 log.info("Got request: " + msg.getText());
 Destination replyDest = msg.getJMSReplyTo();
 String correlationId = msg.getJMSCorrelationID();
 msg = session.createTextMessage("Pong");
 msg.setJMSDestination(replyDest);
 msg.setJMSCorrelationID(correlationId);
 producer.send(msg);
}
origin: eclipse/kapua

/**
 * Send a text message to the specified topic
 * 
 * @param topic
 * @param message
 * @throws JMSException
 */
public void send(String topic, String message, KapuaConnectionContext kcc) throws JMSException {
  TextMessage textMessage = session.createTextMessage();
  Topic jmsTopic = session.createTopic(topic);
  textMessage.setStringProperty(MessageConstants.PROPERTY_BROKER_ID, kcc.getBrokerId());
  textMessage.setStringProperty(MessageConstants.PROPERTY_CLIENT_ID, kcc.getClientId());
  textMessage.setLongProperty(MessageConstants.PROPERTY_SCOPE_ID, kcc.getScopeIdAsLong());
  textMessage.setStringProperty(MessageConstants.PROPERTY_ORIGINAL_TOPIC, JmsUtil.convertMqttWildCardToJms(topic));
  textMessage.setLongProperty(MessageConstants.PROPERTY_ENQUEUED_TIMESTAMP, System.currentTimeMillis());
  textMessage.setText(message);
  textMessage.setJMSDestination(jmsTopic);
  producer.send(jmsTopic, textMessage);
}
javax.jmsTextMessagesetJMSDestination

Popular methods of TextMessage

  • getText
    Gets the string containing this message's data. The default value is null.
  • setText
    Sets the string containing this message's data.
  • setStringProperty
  • setJMSCorrelationID
  • setIntProperty
  • setLongProperty
  • getStringProperty
  • setBooleanProperty
  • setJMSReplyTo
  • getJMSCorrelationID
  • getJMSMessageID
  • getJMSReplyTo
  • getJMSMessageID,
  • getJMSReplyTo,
  • setDoubleProperty,
  • acknowledge,
  • setJMSType,
  • getJMSDeliveryMode,
  • setObjectProperty,
  • getIntProperty,
  • getJMSPriority,
  • clearBody

Popular in Java

  • Running tasks concurrently on multiple threads
  • startActivity (Activity)
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Permission (java.security)
    Legacy security code; do not use.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now