All Projects → rabbitmq → Hop

rabbitmq / Hop

Licence: apache-2.0
RabbitMQ HTTP API client for Java, Groovy, and other JVM languages

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Hop

Server
The backend server software layer which is the part of ONLYOFFICE Document Server and is the base for all other components
Stars: ✭ 104 (-11.11%)
Mutual labels:  rabbitmq
Dotnet Istanbul Microservices Demo
This is the demo application that i created for my talk 'Microservice Architecture & Implementation with Asp.Net Core' at Dotnet İstanbul Meetup Group.
Stars: ✭ 109 (-6.84%)
Mutual labels:  rabbitmq
Java Interview
At the beginning, it was the repository with questions from Java interviews. Currently, it's more like knowledge base with useful links.
Stars: ✭ 114 (-2.56%)
Mutual labels:  rabbitmq
Rabbitmq Dotnet Client
RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.1+
Stars: ✭ 1,580 (+1250.43%)
Mutual labels:  rabbitmq
Springboot Labs
一个涵盖六个专栏:Spring Boot 2.X、Spring Cloud、Spring Cloud Alibaba、Dubbo、分布式消息队列、分布式事务的仓库。希望胖友小手一抖,右上角来个 Star,感恩 1024
Stars: ✭ 12,804 (+10843.59%)
Mutual labels:  rabbitmq
Myth
Reliable messages resolve distributed transactions
Stars: ✭ 1,470 (+1156.41%)
Mutual labels:  rabbitmq
Rabbitmq Supervisor Bundle
Symfony bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons
Stars: ✭ 103 (-11.97%)
Mutual labels:  rabbitmq
Broadway rabbitmq
A Broadway producer for RabbitMQ
Stars: ✭ 117 (+0%)
Mutual labels:  rabbitmq
Mall
mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。
Stars: ✭ 54,797 (+46735.04%)
Mutual labels:  rabbitmq
Rabbitmq Mock
Mock for RabbitMQ Java amqp-client
Stars: ✭ 114 (-2.56%)
Mutual labels:  rabbitmq
Illuminati
This is a Platform that collects all the data accuring in your Application and shows the data in real time by using Kibana or other tools.
Stars: ✭ 106 (-9.4%)
Mutual labels:  rabbitmq
Flink Learning
flink learning blog. http://www.54tianzhisheng.cn/ 含 Flink 入门、概念、原理、实战、性能调优、源码解析等内容。涉及 Flink Connector、Metrics、Library、DataStream API、Table API & SQL 等内容的学习案例,还有 Flink 落地应用的大型项目案例(PVUV、日志存储、百亿数据实时去重、监控告警)分享。欢迎大家支持我的专栏《大数据实时计算引擎 Flink 实战与性能优化》
Stars: ✭ 11,378 (+9624.79%)
Mutual labels:  rabbitmq
Aiormq
Pure python AMQP 0.9.1 asynchronous client library
Stars: ✭ 112 (-4.27%)
Mutual labels:  rabbitmq
Rabbitmq Cli
Command line tools for RabbitMQ
Stars: ✭ 105 (-10.26%)
Mutual labels:  rabbitmq
Amqproxy
An intelligent AMQP proxy, with connection and channel pooling/reusing
Stars: ✭ 115 (-1.71%)
Mutual labels:  rabbitmq
Internals
High level architecture overview
Stars: ✭ 1,407 (+1102.56%)
Mutual labels:  rabbitmq
Spring Boot Examples
🥗​ Spring/SpringBoot/SpringCloud 实践学习案例,从入门到精通,持续更新中,欢迎交流学习🍺 !
Stars: ✭ 110 (-5.98%)
Mutual labels:  rabbitmq
Zeusspring
基于Spring Boot 2.0的前后端分离的快速开发平台,此仓库是后台部分; 前台:Vue+Element 后台:Spring Boot 2.0/Spring Security/JWT/Spring Data JPA+Mybatis-Plus/Redis/分布式限流/同步锁/验证码/动态权限管理 数据权限 工作流 代码生成 日志记录 第三方社交账号、短信登录
Stars: ✭ 117 (+0%)
Mutual labels:  rabbitmq
Dtcqueuebundle
Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}
Stars: ✭ 115 (-1.71%)
Mutual labels:  rabbitmq
Kkbinlog
支持mysql、MongoDB数据变更订阅分发
Stars: ✭ 112 (-4.27%)
Mutual labels:  rabbitmq

:rabbitmq-version: 3.8.9 :hop-version: 3.9.0.RELEASE :spring-version: 5.3.0 :jackson-version: 2.11.3 :reactor-netty-version: 1.0.0 :http-client-version: 4.5.13 :okhttp-version: 3.14.9

= Hop, Java Client for the RabbitMQ HTTP API

image:https://github.com/rabbitmq/hop/workflows/Build%20(Linux)/badge.svg?branch=master["Build Status", link="https://github.com/rabbitmq/hop/actions?query=workflow%3A%22Build+%28Linux%29%22+branch%3Amaster"]

Hop is a Java client for the https://raw.githack.com/rabbitmq/rabbitmq-management/v{rabbitmq-version}/priv/www/api/index.html[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 http://clojurerabbitmq.info[Langohr], and you should use Langohr instead.

== Reactive

As of Hop 2.1.0, a new reactive, non-blocking IO client based on https://projectreactor.io/[Reactor Netty] is available. Note the original blocking IO client remains available.

== Project Maturity

This project is mature and covers all key RabbitMQ HTTP API endpoints.

Meaningful breaking API changes are reflected in the version. User documentation is currently kept in this README.

== Maven Artifacts

image:https://maven-badges.herokuapp.com/maven-central/com.rabbitmq/http-client/badge.svg["Maven Central", link="https://maven-badges.herokuapp.com/maven-central/com.rabbitmq/http-client"]

Project artifacts are available from Maven Central and https://repo.spring.io[repo.spring.io].

=== Maven

If you want to use the blocking IO client, add the following dependencies:

.pom.xml [source,xml,subs="attributes,specialcharacters"]

com.rabbitmq http-client {hop-version} org.springframework spring-web {spring-version} com.fasterxml.jackson.core jackson-databind {jackson-version} ----

If you want to use the reactive, non-blocking IO client, add the following dependencies:

.pom.xml [source,xml,subs="attributes,specialcharacters"]

com.rabbitmq http-client {hop-version} io.projectreactor.netty reactor-netty {reactor-netty-version} com.fasterxml.jackson.core jackson-databind {jackson-version} ----

=== Gradle

If you want to use the blocking IO client, add the following dependencies:

.build.gradle [source,groovy,subs="attributes,specialcharacters"]

compile "com.rabbitmq:http-client:{hop-version}" compile "org.springframework:spring-web:{spring-version}" compile "com.fasterxml.jackson.core:jackson-databind:{jackson-version}"

If you want to use the reactive, non-blocking IO client, add the following dependencies:

.build.gradle [source,groovy,subs="attributes,specialcharacters"]

compile "com.rabbitmq:http-client:{hop-version}" compile "io.projectreactor.netty:reactor-netty:{reactor-netty-version}" compile "com.fasterxml.jackson.core:jackson-databind:{jackson-version}"

=== Milestones and Release Candidates

Milestones and release candidates are available on the RabbitMQ Milestone Repository:

Maven:

.pom.xml [source,xml,subs="attributes,specialcharacters"]

packagecloud-rabbitmq-maven-milestones https://packagecloud.io/rabbitmq/maven-milestones/maven2 true false ----

Gradle:

.build.gradle [source,groovy,subs="attributes,specialcharacters"]

repositories { maven { url "https://packagecloud.io/rabbitmq/maven-milestones/maven2" } }

== 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:

[source,java]

import com.rabbitmq.http.client.Client; import com.rabbitmq.http.client.ClientParameters;

Client c = new Client( new ClientParameters() .url("http://127.0.0.1:15672/api/") .username("guest") .password("guest") );

=== HTTP Layer

The HTTP layer used by the Client is pluggable. The Client(ClientParameters) constructor uses standard JDK HTTP facilities by default, but https://hc.apache.org/[Apache HTTP Components] and https://square.github.io/okhttp/[OkHttp] are also supported.

==== Apache HTTP Components

To use Apache HTTP Components, use an HttpComponentsRestTemplateConfigurator instance when creating the client:

[source,java]

Client client = new Client( new ClientParameters().url("http://localhost:15672/api").username("guest").password("guest") .restTemplateConfigurator(new HttpComponentsRestTemplateConfigurator()) );

This requires to add Apache HTTP Components on the classpath.

For Maven:

.pom.xml [source,xml,subs="attributes,specialcharacters"]

org.apache.httpcomponents httpclient {http-client-version} ----

For Gradle:

.build.gradle [source,groovy,subs="attributes,specialcharacters"]

compile "org.apache.httpcomponents:httpclient:{http-client-version}"

==== OkHttp

To use OkHttp, use an OkHttpRestTemplateConfigurator instance when creating the client:

[source,java]

Client client = new Client( new ClientParameters().url("http://localhost:15672/api").username("guest").password("guest") .restTemplateConfigurator(new OkHttpRestTemplateConfigurator()) );

This requires to add OkHttp on the classpath.

For Maven:

.pom.xml [source,xml,subs="attributes,specialcharacters"]

com.squareup.okhttp3 okhttp {okhttp-version} ----

For Gradle:

.build.gradle [source,groovy,subs="attributes,specialcharacters"]

compile "com.squareup.okhttp3:okhttp:{okhttp-version}"

=== Getting Overview

[source,java]

c.getOverview();

=== Node and Cluster Status

[source,java]

// list cluster nodes c.getNodes();

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

=== Operations on Connections

[source,java]

// 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

[source,java]

// 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

[source,java]

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

=== Managing Users

TBD

=== Managing Permissions

TBD

=== Operations on Exchanges

TBD

=== Operations on Queues

[source,java]

// list all queues c.getQueues();

// list all queues in a vhost c.getQueues();

// declare a queue that's not durable, auto-delete, // and non-exclusive c.declareQueue("/", "queue1", new QueueInfo(false, true, false));

// bind a queue c.bindQueue("/", "queue1", "amq.fanout", "routing-key");

// delete a queue c.deleteQueue("/", "queue1");

=== Operations on Bindings

[source,java]

// 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");

== Running Tests (with Docker)

Start the broker:

docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.8-management

Configure the broker for the test suite:

export HOP_RABBITMQCTL="DOCKER:rabbitmq"
./bin/before_build.sh

Launch the test suite:

./mvnw test

== Running Tests

To run the suite against a specific RabbitMQ node, export HOP_RABBITMQCTL and HOP_RABBITMQ_PLUGINS to point at rabbitmqctl and rabbitmq-plugins from the installation.

Then set up the node that is assumed to be running:

./bin/before_build.sh

This will enable several plugins used by the test suite and configure the node to use a much shorter event refresh interval so that HTTP API reflects system state changes with less of a delay.

To run the tests:

./mvnw test

The test suite assumes RabbitMQ is running locally with stock settings and a few plugins are enabled:

  • rabbitmq_management (listening on port 15672)
  • rabbitmq_shovel_management
  • rabbitmq_federation_management

To run the suite against a specific RabbitMQ node, export HOP_RABBITMQCTL and HOP_RABBITMQ_PLUGINS to point at rabbitmqctl and rabbitmq-plugins from the installation.

The test suite can use a different port than 15672 by specifying it with the rabbitmq.management.port system property:

./mvnw test -Drabbitmq.management.port=15673

== Versioning

This library uses https://semver.org/[semantic versioning].

== Support

See the https://www.rabbitmq.com/java-versions.html[RabbitMQ Java libraries support page] for the support timeline of this library.

== License

https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0].

== Copyright

Michael Klishin, 2014-2016.

VMware, Inc. or its affiliates, 2014-2020.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].