AMQP 0-9-1 Overview
- The AMQP Protocol
- Connections & Channels
- Publishers and Consumers
More Exchange Types
More Consumer Features
Reliable Message Delivery
High Availability and Backup
Management HTTP API
LavinMQ with Java
Java with amqp-client
Begin to add the AMQP library as an dependency in your
(use the latest version):
HOST_URL environment variable to your local LavinMQ instance or
to a hosted LavinMQ setup.
ConnectionFactory and configure it with the URL. All connections are
created from this factory and on the connection we create a Channel.
Declare a queue and publish a message to the “default exchange” with the queue name as routing key. This is a shortcut as all queues by default a bound to the “default queue” with the it’s name as routing parameter.
Then start a consumer which listens to that queue prints out the message body to the console.
The full code can be seen at github.com/cloudamqp/java-amqp-example.
Code example Publish and subscribe
Ready to take the next steps? Here are some things you should keep in mind:
Managed LavinMQ instance on CloudAMQP
LavinMQ has been built with performance and ease of use in mind - we've benchmarked a throughput of about 1,000,000 messages/sec. You can try LavinMQ without any installation hassle by creating a free instance on CloudAMQP. Signing up is a breeze.