Codota Logo
TextMessage.setJMSDestination
Code IndexAdd Codota 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)

  • Common ways to obtain TextMessage
private void myMethod () {
TextMessage t =
  • Codota IconSession session;String text;session.createTextMessage(text)
  • Codota IconSession session;session.createTextMessage()
  • Codota IconQueueSession senderSession;senderSession.createTextMessage()
  • Smart code suggestions by Codota
}
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

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • Menu (java.awt)
  • Kernel (java.awt.image)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Reference (javax.naming)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now