Exchanging RabbitMQ messages with Qpid

In this recipe, we will see how the RabbitMQ client can interoperate with Apache Qpid.

Getting ready

You need to download Qpid from http://qpid.apache.org/download.html; we have used the Java version.

How to do it…

  1. Get a Java example from the previous chapter, for example, the Broadcasting messages or Working with message routing using topic exchanges recipe in Chapter 1, Working with AMQP.
  2. Launch the Qpid server.
  3. Execute the clients.

How it works…

When you execute the client from the example in the Broadcasting messages recipe in Chapter 1, Working with AMQP, the server has the same RabbitMQ behavior as you can see in the following screenshot:

How it works…

Tip

QPid uses the same RabbitMQ port, so change the port or simply shut down RabbitMQ if you want to try both on the same machine.

There's more…

There are other AMQP brokers you can use for this test, but if you don't need to change the broker, you should always use the vendor client in order to take advantage of the broker's capabilities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset