Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rabbitmq/rabbitmq-java-client
RabbitMQ Java client
https://github.com/rabbitmq/rabbitmq-java-client
java rabbitmq
Last synced: 5 days ago
JSON representation
RabbitMQ Java client
- Host: GitHub
- URL: https://github.com/rabbitmq/rabbitmq-java-client
- Owner: rabbitmq
- License: other
- Created: 2010-09-20T10:43:18.000Z (over 14 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T01:30:31.000Z (about 2 months ago)
- Last Synced: 2024-10-29T11:17:12.188Z (about 2 months ago)
- Topics: java, rabbitmq
- Language: Java
- Homepage: https://www.rabbitmq.com/java-client.html
- Size: 67.2 MB
- Stars: 1,244
- Watchers: 112
- Forks: 575
- Open Issues: 23
-
Metadata Files:
- Readme: README.adoc
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-java - RabbitMQ Java client - RabbitMQ client. (Projects / Messaging)
README
:client-stable: 5.24.0
:client-rc: 5.17.0.RC2
:client-snapshot: 5.25.0-SNAPSHOT= RabbitMQ Java Client
image:https://maven-badges.herokuapp.com/maven-central/com.rabbitmq/amqp-client/badge.svg["Maven Central", link="https://maven-badges.herokuapp.com/maven-central/com.rabbitmq/amqp-client"]
image:https://github.com/rabbitmq/rabbitmq-java-client/actions/workflows/test.yml/badge.svg["Build Status", link="https://github.com/rabbitmq/rabbitmq-java-client/actions/workflows/test.yml"]This repository contains source code of the https://www.rabbitmq.com/client-libraries/java-api-guide[RabbitMQ Java client].
The client is maintained by the https://github.com/rabbitmq/[RabbitMQ team at Broadcom].== Dependency (Maven Artifact)
This client releases are independent of RabbitMQ server releases and can be used with RabbitMQ server `3.x`.
They require Java 8 or higher.=== Stable
==== Maven
.pom.xml
[source,xml,subs="attributes,specialcharacters"]
----com.rabbitmq
amqp-client
{client-stable}----
==== Gradle
.build.gradle
[source,groovy,subs="attributes,specialcharacters"]
----
compile 'com.rabbitmq:amqp-client:{client-stable}'
----////
=== Milestones and Release Candidates==== Maven
.pom.xml
[source,xml,subs="attributes,specialcharacters"]
----com.rabbitmq
amqp-client
{client-rc}----
Milestones and release candidates are available on the RabbitMQ Milestone Repository:
.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"]
----
compile 'com.rabbitmq:amqp-client:{client-rc}'
----Milestones and release candidates are available on the RabbitMQ Milestone Repository:
.build.gradle
[source,groovy,subs="attributes,specialcharacters"]
----
repositories {
maven {
url "https://packagecloud.io/rabbitmq/maven-milestones/maven2"
}
}
----
////=== Snapshots
==== Maven
.pom.xml
[source,xml,subs="attributes,specialcharacters"]
----com.rabbitmq
amqp-client
{client-snapshot}----
Snapshots are available on the Sonatype OSS snapshot repository:
.pom.xml
[source,xml,subs="attributes,specialcharacters"]
----
ossrh
https://oss.sonatype.org/content/repositories/snapshots
true
false
----
==== Gradle
.build.gradle
[source,groovy,subs="attributes,specialcharacters"]
----
compile 'com.rabbitmq:amqp-client:{client-snapshot}'
----Snapshots are available on the Sonatype OSS snapshot repository:
.build.gradle
[source,groovy,subs="attributes,specialcharacters"]
----
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
mavenCentral()
}
----=== 4.x Series
**As of 1 January 2021 the 4.x branch is no longer supported**.
== Experimenting with JShell
You can experiment with the client from JShell. This requires Java 9 or more.
[source,shell]
----
git clone https://github.com/rabbitmq/rabbitmq-java-client.git
cd rabbitmq-java-client
./mvnw test-compile jshell:run
...
import com.rabbitmq.client.*
ConnectionFactory cf = new ConnectionFactory()
Connection c = cf.newConnection()
...
c.close()
/exit
----== Building from Source
=== Getting the Project and its Dependencies
[source,shell]
----
git clone [email protected]:rabbitmq/rabbitmq-java-client.git
cd rabbitmq-java-client
make deps
----=== Building the JAR File
[source,shell]
----
./mvnw clean package -Dmaven.test.skip
----=== Launching Tests with the Broker Running in a Docker Container
Run the broker:
[source,shell]
----
docker run -it --rm --name rabbitmq -p 5672:5672 rabbitmq
----Launch "essential" tests (takes about 10 minutes):
[source,shell]
----
./mvnw verify \
-Drabbitmqctl.bin=DOCKER:rabbitmq \
-Dit.test=ClientTestSuite,FunctionalTestSuite,ServerTestSuite
----Launch a single test:
[source,shell]
----
./mvnw verify \
-Drabbitmqctl.bin=DOCKER:rabbitmq \
-Dit.test=DeadLetterExchange
----=== Launching Tests with a Local Broker
The tests can run against a local broker as well. The `rabbitmqctl.bin`
system property must point to the `rabbitmqctl` program:[source,shell]
----
./mvnw verify \
-Dtest-broker.A.nodename=rabbit@$(hostname) \
-Drabbitmqctl.bin=/path/to/rabbitmqctl \
-Dit.test=ClientTestSuite,FunctionalTestSuite,ServerTestSuite
----To launch a single test:
[source,shell]
----
./mvnw verify \
-Dtest-broker.A.nodename=rabbit@$(hostname) \
-Drabbitmqctl.bin=/path/to/rabbitmqctl \
-Dit.test=DeadLetterExchange
----== Contributing
See link:CONTRIBUTING.md[Contributing] and link:RUNNING_TESTS.md[How to Run Tests].
== Versioning
This library uses https://semver.org/[semantic versioning].
== Support
See the https://www.rabbitmq.com/client-libraries/java-versions[RabbitMQ Java libraries support page]
for the support timeline of this library.== License
This package, the RabbitMQ Java client library, is https://www.rabbitmq.com/client-libraries/java-api-guide#license[triple-licensed] under
the Mozilla Public License 2.0 ("MPL"), the GNU General Public License
version 2 ("GPL") and the Apache License version 2 ("AL").This means that the user can consider the library to be licensed under **any of the licenses from the list** above.
For example, you may choose the Apache Public License 2.0 and include this client into a commercial product.
Projects that are licensed under the GPLv2 may choose GPLv2, and so on.