Giter Site home page Giter Site logo

hornetq-remote-messaging-demo's Introduction

JMS Remote Messaging Usecases on JBoss AS

This demo shows the various ways of sending JMS messages to remote (JVM) HornetQ system running on JBoss AS a.k.a Wildfly

Prerequisites for the Demo

  • Ensure that [Oracle JDK] (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) is installed
  • Set the JAVA_HOME environment variable pointing to the JDK installation
  • Update the PATH environment variable to include the bin directory of the JDK installation
  • If in a new command prompt window you are able to run the command: javac -version you are all set
  • For building the packaged source code, download and install Maven
  • Ensure that the PATH environment variable to include the bin directory of the Maven installation

Highlights of the Demo

The install process will:

  • Setup two standlaone instances of Wildfly server
  • Start the servers : Server 1 and Server 2, with Server 2 started with a port offset of 100
  • On Server 1, thru CLI scripts
  • Configure JMS Queues: JMSBridgeSourceQ, LocalServer1Q
  • JMS Bridge: simple-jms-brdige
  • A pooled-connection-factory using outbound JCA adapter
  • On Server 2, thru CLI scripts
  • Configure JMS Queues: JMSBridgeTargetQ, LocalServer2Q

In this demo you will see how to send messages to a:

  • Remote queue running inside JBoss AS using a simple local Java client
  • Remote queue running inside JBoss AS from a process running on local JBoss AS
  • Local queue which will then forward the message to a remote using a JMS bridge

Pre-Installation Setup

  1. [Download RHQ Bundle Deployer 4.8.0] (http://search.maven.org/remotecontent?filepath=org/rhq/rhq-ant-bundle-common/4.8.0/rhq-ant-bundle-common-4.8.0.zip)
  2. Extract the contents of rhq-ant-bundle-common-4.8.0.zip to the root folder of the demo

Command-Line Installation

  • Open up Linux terminal or Windows command prompt
  • Navigate to the demo root folder. On Unix/Linux, run chmod -R 755 * at the command prompt when in the demo root folder
  • Configure runtime properties in the file deployment.properties, including path to the deployment folder
  • Execute either install.sh or install.bat based on the OS
  • Based on the bind address configured in the deployment properties verify the startup of the server(s)

Building the Source Code with Maven

  • Navigate to the folder jms-remote-messaging-usecases in the demo root folder
  • Find the files RemoteQueueInteractor.java, RemoteMDB.java and correct the IP address to the IP of your physical server
  • Come back to folder jms-remote-messaging-usecases at command propmt and run mvn clean package
  • If everything goes well and the build is a SUCCESS, the included test case for simple-remote-messaging-client has already sent out a message to LocalServer1Q on Server 1
  • Now deploy the WAR file simple-remote-messaging-webapp\target\simple-remote-messaging-webapp.war onto Server 1
  • Assuming a successful WAR deployment and assuming the IP address of the server is 192.168.1.21 for example

hornetq-remote-messaging-demo's People

Contributors

vchintal 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.