Skip to content

Latest commit

 

History

History
73 lines (65 loc) · 4.8 KB

ObtainingGateways.md

File metadata and controls

73 lines (65 loc) · 4.8 KB

Obtaining and configuring Kaazing Gateways and related Servers

The Kaazing Universal WebSocket clients depend on the Kaazing WebSocket Gateway (KWG) being installed on one or more servers. KWG supports two protocols, AMQP and JMS.

AMQP

  • Download AMQP Gateway (Gateway + Documentation + Demos) from AMQP Gateway downloads page as a ZIP file This package also contains AMQP server Apache QPID see - Apache QPID for more information.
  • Unzip the downloaded package to <your installation directory>
  • By default, the Kaazing Gateway is configured to restrict communications and accept requests only from scripts that are served by the embedded HTTP server which may not be convenient for Web Development. In order to disable it
    • Go to _<your installation directory>/kaazing-websocket-gateway-amqp-4.0.6/conf _
    • Edit gateway_config.xml
    • Locate lines
      <allow-origin>http://${gateway.hostname}:${gateway.extras.port}</allow-origin> and replace them with <allow-origin>*</allow-origin>
    • Make sure that you have Java 7 or greater installed
    • Open terminal window at <your installation directory>/kaazing-websocket-gateway-amqp-4.0.6/bin and start gateway
      ./gateway.start
    • Open terminal window at <your installation directory>/qpid-java-broker-0.28/bin and start Apache QPID AMQP server
      ./qpid-server
    • Note: to stop both Gateway and AMQP server just execute Ctrl-C on the relevant terminal windows or just close them.

Documentation

Important AMQP Notes

  • AMQP Facade library uses Fanout Exchange as the publishing endpoint which does not user Routing Key. Queue is automatically generated based on the unique client ID and is bound to the Exchange. For more information about Exchanges, Routing and Queues refer to RabbitMQ AMQP 0-9-1 Model Explained

JMS

  • Download JMS Gateway (Gateway + Demos) from JMS Gateway Download Site as a ZIP file This package also contains JMS server Apache ActiveMQ see - Apache ActiveMQ for more information.
  • Unzip the downloaded package to <your installation directory>
  • By default, the Kaazing Gateway is configured to restrict communications and accept requests only from scripts that are served by the embedded HTTP server which may not be convenient for Web Development. In order to disable it
    • Goto _<your installation directory>/kaazing-websocket-gateway-jms-4.0.9/conf _

    • Open gateway_config.xml

    • Locate lines
      <allow-origin>http://${gateway.hostname}:${gateway.extras.port}</allow-origin> and replace them with <allow-origin> *</allow-origin>

    • Make sure that you have Java 7 or greater installed

    • Open terminal window at _<your installation directory>/kaazing-websocket-gateway-jms-4.0.9/bin _ and start gateway
      ./gateway.start

    • Open terminal window at _<your installation directory>/apache-activemq-5.10.0/bin _ and start Apache Active MQ JMS server
      ./activemq start

    • Note: to stop:

      • Gateway: execute Ctrl-C on the relevant terminal windows or just close it.
      • Apache ActiveMQ JMS Server: open terminal window at _<your installation directory>/apache-activemq-5.10.0/bin _ and execute
        ./activemq stop

Documentation

Important JMS Notes

  • JMS Subscription created by the Facade Library is not durable - the client will not receive any messages that were sent before the subscription started. More information about durable subscriptions can be found at Messaging Patterns.
  • Due to the blocking nature of JMS, application that use JMS client may receive an exception when sending large number of messages IllegalStateException: Message send already in progress