Giter Site home page Giter Site logo

hop's Introduction

Hop, Java Client for the RabbitMQ HTTP API

Hop is a Java client for the RabbitMQ HTTP API.

Polyglot

Hop is designed to be easy to use from other JVM languages, primarily Groovy, Scala, and Kotlin.

N.B. that Clojure already includes an HTTP API client as part of Langohr, and you should use Langohr instead.

Project Maturity

This project is young and not 100% feature complete but the key API operations are covered. The docs largely don't exist. The API may change but radical changes are unlikely.

This section will be updated as the project matures.

Maven Artifacts

Project artifacts are released to repo.spring.io.

Maven

If you use Maven, add the following repository definition to your pom.xml:

<repository>
  <id>spring-milestones</id>
  <url>http://repo.spring.io/milestone</url>
</repository>

The most recent release is

<dependency>
  <groupId>com.rabbitmq</groupId>
  <artifactId>http-client</artifactId>
  <version>1.0.0.M1</version>
</dependency>

Gradle

Add the following to your build.gradle:

repositories {
    maven {
        url "http://repo.spring.io/milestone"
    }
}

Current (unpublished) snapshot release is

compile "com.rabbitmq:http-client:1.0.0.M1"

Usage Guide

Instantiating a Client

Hop faithfully follows RabbitMQ HTTP API conventions in its API. You interact with the server using a single class, Client, which needs an API endpoint and a pair of credentials to be instantiated:

import com.rabbitmq.hop.Client;

Client c = new Client("http://127.0.0.1:15672/api/", "guest", "guest");

Getting Overview

c.getOverview();

Node and Cluster Status

// list cluster nodes
c.getNodes();

// get status and metrics of individual node
c.getNode("[email protected]");

Operations on Connections

// list client connections
c.getConnections();

// get status and metrics of individual connection
c.getConnection("127.0.0.1:61779 -> 127.0.0.1:5672");

// forcefully close connection
c.closeConnection("127.0.0.1:61779 -> 127.0.0.1:5672");

Operations on Channels

// list all channels
c.getChannels();

// list channels on individual connection
c.getChannels("127.0.0.1:61779 -> 127.0.0.1:5672");

// list detailed channel info
c.getChannel("127.0.0.1:61779 -> 127.0.0.1:5672 (3)");

Operations on Vhosts

// get status and metrics of individual vhost
c.getVhost("/")

Managing Users

TBD

Managing Permissions

TBD

Operations on Exchanges

TBD

Operations on Queues

TBD

Operations on Bindings

// list bindings where exchange "an.exchange" is source
// (other things are bound to it)
c.getBindingsBySource("/", "an.exchange");

// list bindings where exchange "an.exchange" is destination
// (it is bound to other exchanges)
c.getBindingsByDestination("/", "an.exchange");

License

Apache 2.0.

Copyright

Michael Klishin, 2014.

hop's People

Contributors

artembilan avatar garyrussell avatar michaelklishin avatar spring-builds avatar

Watchers

 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.