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

How to use
setJMSDeliveryMode
method
in
javax.jms.TextMessage

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

origin: apache/activemq-artemis

m.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
origin: apache/activemq-artemis

m.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
origin: com.betfair.cougar/jms-transport

@Override
public TextMessage marshallEvent(EventServiceBindingDescriptor bindingDescriptor, Event event, Object session) throws CougarException {
  try {
    TextMessage message = ((Session)session).createTextMessage(marshallEventBody(event));
    //Sets the routing string
    message.setStringProperty(JMSPropertyConstants.MESSAGE_ROUTING_FIELD_NAME, getHostString(event));
    //Sets the message id guid.  If there isn't one, make one up
    String messageId = event.getMessageId();
    if (messageId == null) {
      messageId = new RequestUUIDImpl().toString();
    }
    message.setStringProperty(JMSPropertyConstants.MESSAGE_ID_FIELD_NAME, messageId);
    //Sets the version header
    message.setStringProperty(JMSPropertyConstants.EVENT_VERSION_FIELD_NAME, bindingDescriptor.getServiceVersion().toString());
    //Sets the event name header
    message.setStringProperty(JMSPropertyConstants.EVENT_NAME_FIELD_NAME, event.getClass().getSimpleName());
    message.setBooleanProperty("JMS_SonicMQ_preserveUndelivered", true);
    message.setBooleanProperty("JMS_SonicMQ_notifyUndelivered",   true);
    message.setJMSDeliveryMode(deliveryMode);
    message.setJMSExpiration(expirationTime);
    message.setJMSPriority(priority);
    return message;
  } catch (JMSException jmsex) {
    throw new CougarFrameworkException("Error marshalling Event", jmsex);
  } catch (UnknownHostException e) {
    throw new CougarFrameworkException("Error looking up local host name", e);
  }
}
origin: stackoverflow.com

textMessage.setJMSType("mcd://xmlns");//message type
textMessage.setJMSExpiration(2*1000);//message expiration
textMessage.setJMSDeliveryMode(DeliveryMode.PERSISTENT); //message delivery mode either persistent or non-persistemnt
javax.jmsTextMessagesetJMSDeliveryMode

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
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • 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