Get started

Downloading Starlight for RabbitMQ

IMPORTANT

By downloading this DataStax product, you agree to the terms of the open-source Apache-2.0 license agreement.

  1. Download the Starlight for RabbitMQ tar file from the DataStax downloads page.

    The following files are available in the tar file:

    File Purpose

    starlight-rabbitmq-1.1.0-jar-with-dependencies.jar

    Running as a standalone Java application

    starlight-rabbitmq-1.1.0.nar

    Running as a protocol handler or a proxy extension

  2. Extract the files from the tar with the following command:

    tar xvfz starlight-rabbitmq-<version>-all.tar.gz

Running Starlight for RabbitMQ as a standalone Java application

The jar file for running as a standalone Java application is available in the downloaded tar file.

  1. Set the URLs of the Apache Pulsar™ brokers and the Apache ZooKeeper™ configuration store in a configuration file:

    Example:

    brokerServiceURL=pulsar://localhost:6650
    brokerWebServiceURL=http://localhost:8080
    configurationStoreServers=localhost:2181
  2. Run the jar file as a Java application and provide the configuration file path in the -c/--config option:

     java -jar ./starlight-rabbitmq/target/starlight-rabbitmq-${version}-jar-with-dependencies.jar -c conf/my-starlight-for-rabbitmq.conf

Running Starlight for RabbitMQ as a protocol handler

Starlight for RabbitMQ can be embedded directly into the Pulsar brokers by loading it as a protocol handler.

The nar file for running as a protocol handler is available in the downloaded tar file.

  1. Set the configuration of Starlight for RabbitMQ protocol handler in the broker configuration file, which is typically broker.conf or standalone.conf.

    Example:

    messagingProtocols=rabbitmq
    protocolHandlerDirectory=./protocols
  2. Set the AMQP service listeners.

    The hostname value in ampqListeners is the same as Pulsar broker’s advertisedAddress.

    amqpListeners=amqp://127.0.0.1:5672
    advertisedAddress=127.0.0.1
  3. Start the Pulsar broker.

Running Starlight for RabbitMQ as a proxy extension

Starlight for RabbitMQ can be embedded into the Pulsar Proxy by loading it as a proxy extension.

The nar file for running as a proxy extension is available in the downloaded tar file.

  1. Set the configuration of Starlight for RabbitMQ protocol handler in the Pulsar Proxy configuration file, which is typically proxy.conf.

    Example:

    proxyExtensions=rabbitmq
    proxyExtensionsDirectory=./protocols
  2. Set the AMQP service listeners.

    The hostname value in listeners is the same as Pulsar proxy’s advertisedAddress.

    Example:

    amqpListeners=amqp://127.0.0.1:5672
    advertisedAddress=127.0.0.1
  3. Start the Pulsar proxy.

Ensure Starlight for RabbitMQ works

You can use a RabbitMQ/AMQP-0.9.1 client or a tool such as RabbitMQ PerfTest to ensure everything works correctly.

For instance, the following Python script creates a queue, publishes a message that will be routed to this queue, reads the message from the queue, and deletes the queue:

#!/usr/bin/env python
import pika

connection = pika.BlockingConnection(pika.ConnectionParameters(port=5672))
channel = connection.channel()

try:
    channel.queue_declare("test-queue")
    print("created test-queue queue")
    channel.basic_publish(exchange="", routing_key="test-queue", body="test".encode('utf-8'))
    print("published message test")
    _, _, res = channel.basic_get(queue="test-queue", auto_ack=True)
    assert res is not None, "should have received a message"
    print("received message: " + res.decode())
    channel.queue_delete("test-queue")
    print("deleted test-queue queue")
finally:
    connection.close()

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com