Share this page

# jms_publish_message_topic

Publishes messages to a specific topic.

Example: jms_publish_message_topic and jms_receive_message_topic | Web Services Functions (SOAP, WEB_SERVICE, Silverlight)

    int jms_publish_message_topic( const char * StepName, const char * PublishedMessage, const char * TopicName );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All input string arguments (char type) except the step name can be parameterized using standard parameterization.

StepName | The name of the step, as it appears in the test tree. Any text can be used.
PublishedMessage | The message to send.
TopicName | The JNDI name of the topic from which to receive the message.

The jms_publish_message_topic function creates a publisher on a topic and publishes a message.

VuGen identifies the topic by calling a lookup method on a JNDI context defined in the JMS runtime settings.

Insert the jms_set_message_property function before this statement to set a JMS header or property for the next message to be sent.

This function fails, causing the script to stop (if the Continue on Error runtime setting is not selected) if:

- The JNDI context is incorrect.

- The topic cannot be located.

- A communication error occurs.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: