< Table of Contents

Checklist: Build JavaScript JMS Clients

This checklist provides the steps necessary to use the Kaazing Enterprise JavaScript JMS Client SDK to enable your web application to communicate with any JMS-compliant message broker, such as Apache ActiveMQ, using JavaScript. To download the Kaazing Enterprise JavaScript JMS Client SDK, see Setting Up the Gateway and Clients.

# Step Topic or Reference
1 Learn about supported browsers, operating systems, and platform versions. Release Notes
2 Learn how to use the Kaazing Enterprise JavaScript JMS Client API and the supported APIs. Use the Kaazing Enterprise JavaScript JMS Client API
3 Learn how to authenticate your client by implementing a challenge handler to respond to authentication challenges from the Gateway. Secure Your JavaScript Client
4 Troubleshoot the most common issues that occur when using JavaScript clients. Troubleshoot Your JavaScript JMS Client
5 Learn how to gather data on the Kaazing JavaScript JMS client. Display Logs for the JavaScript JMS Client

Introduction

This document contains information for a JavaScript developer who wants to develop a JavaScript client that communicates with a JMS-compliant message broker through the Gateway over WebSocket.

Overview of the Kaazing Enterprise JMS Client Libraries

Kaazing provides JMS client libraries that allow clients to subscribe from and publish messages to a JMS-compliant message broker. With the Kaazing Enterprise JMS client libraries, you can leverage WebSocket in your application and communicate between your application and the JMS-compliant message broker, as shown in the following figure:

Java JMS Client
Figure: Enable communication between your application and the JMS-compliant message broker

About the Kaazing Enterprise JavaScript JMS Client API

Kaazing provides a JavaScript JMS Client API that enables you to use JavaScript to create JMS-based client web applications. As a JavaScript developer, you can use this API to publish and subscribe to JMS-based messages between your application and your message broker.

The JavaScript JMS Client API exposes capabilities similar to the Java Message Service (JMS) API in Java, including the JMS concepts of connection, session, destination, message consumer, and message producer. Refer to the JMS API documentation, located at http://www.oracle.com/technetwork/java/docs-136352.html, for specific information about how to use each of the interfaces.

For a description of the methods currently supported by the Kaazing Gateway Java JMS Client API, see Kaazing Gateway JMS Client Libraries: Supported APIs.

Note: For this how-to, you can use any JMS-compliant message broker. By default, the Gateway is configured to connect to the server on port 61616. You can configure the connect URL in the file GATEWAY_HOME/conf/gateway-config.xml. See About Integrating Kaazing Gateway and JMS-Compliant Message Brokers for more information.

Taking a Look at the JavaScript JMS Client Tutorial App

Before you start, take a look at a demo that was built with the JavaScript client library, available on Github at https://github.com/kaazing/javascript.client.tutorials. To see these JavaScript clients in action, perform the following steps:

  1. Clone or download the JavaScript JMS tutorial from https://github.com/kaazing/javascript.client.tutorials.
  2. In a terminal, navigate to the folder for the JMS tutorial, javascript.client.tutorials/jms. The steps for building the tutorial are here: https://github.com/kaazing/javascript.client.tutorials/blob/develop/README.md.
  3. Enter npm install to build the tutorial. You might need to execute the command with admin credentials. If you need to install Node.js® and update npm, see https://docs.npmjs.com/getting-started/installing-node.
  4. Enter node server.js to run the included Node.js® server component (server.js).
  5. In a browser, enter the URL http://localhost:3000/.
  6. Send messages to the JMS service running at the public Kaazing WebSocket Gateway address wss://sandbox.kaazing.net/jms.