In this Java programming tutorial, developers will learn how to create a Java Message Service (JMS) class. Here is sample Java code that shows how to do this:
* / public class JmsAppSpecificProps {public static void main (String args[]) {…} protected void writeMessage (String text) throws JMSException {TextMessage textMessage = publishSession.createTextMessage (); textMessage.setText (text); //Message textMessage.setStringProperty(“serverURL”,”https://10.77.62.12/hint “); // application-specific property Publisher.publish (textMessage); // publish the message}} / *
Running this code results in the following output:
The serverURL property is published with the standard message