Coder Social home page Coder Social logo

mq-gateway's Introduction

MQ Gateway example

The Gateway provides a service for discovery, load balancing and failover of services running within a Fabric8. For messaging clients with A-MQ using any protocol (OpenWire, STOMP, MQTT, AMQP or WebSockets) they can discover and connect to the right broker letting the gateway deal connection management and proxy requests to where the services are actually running. See more information on the official documnetation

This simple example deploys a Standalone AMQ broker and a default MQ Gateway. The MQ Gateway listens on 61616 port and is able to detect protocol and proxy every request on the real services. To test the gateway you can use any Openwire, MQTT, STOMP or AMQP client and point it to 61616 port. In the example boh a STOMP ruby client and an OpenWire one are provided.

Building the code and testing the Gateway

  1. Clone this repo
  2. Build and install example into your local maven repo
    $ mvn clean install
  3. Launch JBoss Fuse ESB $ $FUSE_HOME/bin/start $ $FUSE_HOME/bin/client
  4. Run Karaf installer from Karaf console
    shell:source mvn:it.redhat.quickstarts.mqgateway/installer/1.0-SNAPSHOT/karaf/installer
  5. Wait for containers to successfully provision
  6. Go in the stomptest directory and run in two different terminals the ruby stompcat client
  7. Run the STOMP ruby producer $ cat | ./catstomp
  8. Run the STOMP ruby consumer $ stompcat
  9. type a message in the STOMP producer and observe the STOMP consumer.
  10. Use hawt.io to observe the Gateway detecting the protocol and redirecting the traffic to the proper endpoint
  11. If you want to test OpenWire too, go in the openwiretest directory. You may have to modify the AMQ_HOME variable to point to your installation, export AMQ_HOME=/path/to/your/amq
  12. Run in two different terminals
  13. $ consumer.sh
  14. $ producer.sh

Thanks to

mq-gateway's People

Contributors

fmarinelli avatar ugol avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.