Get started
Downloading Starlight for RabbitMQ
- 
Download the Starlight for RabbitMQ
tarfile from the DataStax downloads page.The following files are available in the
tarfile: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
 - 
Extract the files from the
tarwith 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.
- 
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 - 
Run the
jarfile as a Java application and provide the configuration file path in the-c/--configoption: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.
- 
Set the configuration of Starlight for RabbitMQ protocol handler in the broker configuration file, which is typically
broker.conforstandalone.conf.Example:
messagingProtocols=rabbitmq protocolHandlerDirectory=./protocols - 
Set the AMQP service listeners.
The hostname value in
ampqListenersis the same as Pulsar broker’sadvertisedAddress.amqpListeners=amqp://127.0.0.1:5672 advertisedAddress=127.0.0.1 - 
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.
- 
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 - 
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 - 
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()