Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Start a new JMeter instance by executing the following script from the <JMeter_Home>/bin folder: 

    • On windows: jmeter.bat
    • On Linux: sh jmeter.sh
  2. Create a new test plan Thread Group in JMeter: Right-click on Test Plan (in the left navigator) and go to Add -> Threads (Users) -> Thread Group.

  3. The new thread group will now be listed in the left navigator as a test planunder the Test Plan.
  4. Right-click on the new test plan Thread Group and go to Add -> Sampler -> JMS Publisher.
  5. Name this publisher Games Publisher.
  6. You will now have a JMS Publisher node in the left navigator. Select this node and enter the following details:

    Initial Context Factoryorg.wso2.andes.jndi.PropertiesFileInitialContextFactory
  7. The connection details you specified in the jnditopics.properties file should be entered for the JMS Publisher as shown below.

    Provider URLThis should be the The location where you have saved the jnditopics.properties file saved.
    Connection FactoryThis should be set to TopicConnectionFactory.
    DestinationThis should be the jndi The JNDI name of the topic to which the message should be published. The jnditopics.properties file specifies the mapping between topic names and jndi names. For example, as specified in the jnditopics.properties file, enter 'Cricket_Only' if you want to publish a message to the cricket topic. Alternatively, you can publish to any of the following destinations: 'Football_Only', 'Germany_Only', 'Brazil_Only', 'India_Only', 'Australia_Only'.
    Expiration0
    Priority0
  8. Save the information. You now have a JMS client ready to send messages.

  9. Execute the JMeter publisher.
  10. Go back to the management console of the MB profile and go to Subscriptions -> Topic Subscription List in the Main tab. You will observe the following: 
    Image Modified

    Note the following:

    1. The non-durable topic subscription has immediately received the published messaged. You can verify this from the  View Results in Tree tab of the respective JMeter client.
    2. The first durable subscription (Sub_1) has also received the published message. Verify this from the  View Results in Tree tab of the respective JMeter client.
    3. The second durable subscription (Sub_2) has not received the message because the subscription was inactive. However, the unconsumed message is listed as a pending delivery for the subscriber as shown above. This means that as soon as Sub_2 becomes active, the message will be delivered.