Coder Social home page Coder Social logo

active-mq-consul-discovery's Introduction

Consul Discovery Agent for ActiveMQ

Out of the box, Apache ActiveMQ, supports a few Discovery protocols, e.g. multicast, static and master-slave

This library adds support for performing Discovery against a Consul agent, by specifying API access point and service name.

Currently, the library is in a proof-of-concept state and has only been tested against Jboss A-MQ but should work fine with vanilla ActiveMQ as well.

Install

Jboss A-MQ

mvn clean install
cp target/active-mq-consul-discovery-[VERSION]-jar-with-dependencies.jar [JBOSS A-MQ HOME]/deploy/

Configure

Network of brokers

Configure a network connector with consul as URI in activemq.xml

<networkConnectors>
  <networkConnector uri="consul:(http://consul.example.com?service=active-mq&amp;address=amq.example.com&amp;port=61616)"/>
</networkConnectors>

This will perform discovery against http://consul.example.com/v1/health/service/active-mq, i.e. the actual API endpoint is automatically appended and should NOT be included in the URI.

The following parameters are required:

service
the name of the service to register with Consul
address
the address to the service, i.e the host at which A-MQ listens
port
the port on which A-MQ listens

The following parameters are supported but not required:

serviceId
the ID for this instance of the service. Will be randomly generated if left out.
maxQuarantineTime
The maximum time to quarantine a failing peer service that is still available in Consul. Defaults at 120 000 ms
interval
The interval with which to poll Consul for service instances. Defaults at 30 000 ms

Client-side

Tested in Jboss EAP 6.4 Make sure the active-mq consul client JAR is included in the resource adapter module, and enter a URI similar to this:

discovery:(consul:(http://consul:8500?service=active-mq&clientOnly=true))

Road-map

Planned items are:

  • Maven releases

Contributions

Feel free to make feature requests or preferably pull requests!

License

Licensed under the Apache License, Version 2.0

active-mq-consul-discovery's People

Contributors

erik-hakansson-wcar avatar erikhakansson avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

terezivy

active-mq-consul-discovery's Issues

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.