I am working through the RabbitMQ Java tutorial found here: https://www.rabbitmq.com/tutorials/tutorial-one-java.html
I have downloaded the Java Client Library package, and copied the JAR files to my project in Eclipse, but the import statements
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
all yield the error
The import "com.rabbitmq" cannot be resolved.
The instructions are unclear how to incorporate the JAR files from the Java Client Library package, how should I proceed?
The RabbitMQ Java client library allows Java and JVM-based applications to connect to and interact with RabbitMQ nodes. 5. x release series of this library require JDK 8, both for compilation and at runtime. On Android, this means only Android 7.0 or later versions are supported.
RabbitMQ uses a protocol called AMQP by default. To be able to communicate with RabbitMQ you need a library that understands the same protocol as RabbitMQ. Download the client library for the programming language that you intend to use for your applications.
The . NET RabbitMQ client library is hosted and developed on GitHub. Please see the . NET client build guide for instructions on compiling from source.
In order for a client to interact with RabbitMQ it must first open a connection. This process involves a number of steps: Application configures the client library it uses to use a certain connection endpoint (e.g. hostname and port) The library resolves the hostname to one or more IP addresses.
You can download the rabbitmq-java-client-bin-3.5.4.zip from official link here . Then extract the rabbitmq-client.jar from the zip & add it to your class path in project. Then you will be able to resolve The import "com.rabbitmq"
. Give it a try.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With