Starlight for RabbitMQ protocol handler

Following the protocol handler interface, Starlight for RabbitMQ constructs a "gateway" service that acts as a RabbitMQ cluster replacement.

RabbitMQ employs the concepts of Exchanges, Queues, and Bindings to provide basic routing capabilities inside the message broker. Starlight for RabbitMQ acts as intermediary between RabbitMQ’s AMQP protocol and Pulsar’s binary protocol. The result allows RabbitMQ applications to leverage Pulsar features like load balancing of the topics on the brokers, batching of messages, partitioning of topics, and load balancing of the data on the consumers.

Publishing messages

On the publishing side, an AMQP exchange is mapped to a topic. Depending on the type of exchange, the publish routing key can also be included in the topic name.

Consuming messages

On the consumer side, Pulsar shared subscriptions are used to represent the AMQP Bindings from an Exchange to a Queue. When creating an AMQP Queue consumer, the protocol handler creates Pulsar consumers for all the Bindings of the Queue.

When you unbind the Queue, the Pulsar subscription isn’t deleted right away since the consumer can be lagging. Messages are still received from the subscription and filtered if their position is past the end of the binding. Starlight for RabbitMQ periodically checks if all messages from the closed binding have been acknowledged. Once the messages have been acknowledged, the corresponding subscription is removed.

For more details on the AMQP 0.9.1 model refer to the AMQP 0-9-1 Model Explained guide in RabbitMQ documentation.

Mapping AMQP entity constructs to Pulsar constructs

RabbitMQ Pulsar Description

Virtual host

Tenant/Namespace

vHosts map to the combination of your Pulsar tenant and a namespace within that tenant. See Multi-tenancy and VHosts.

Exchange and optional Routing Key

Topic Name

The exchange name is the topic name.

If the optional routing key is provided, then the exchange name and key are combined with a double underscore (__) as the topic name.

Queue and Bindings

Consumer subscriptions

A collection of Pulsar consumer shared subscriptions that represent all bindings in the queue.

Multi-tenancy and VHosts

Starlight for RabbitMQ offers support for multi-tenancy by mapping an AMQP Virtual host to a Pulsar tenant and namespace.

This mapping requires that the AMQP VHost names contain only characters that are allowed in Pulsar tenant and namespace names: a-z, A-Z, 0-9, _, -, =, :, and ..

Full VHost names map directly to a Pulsar tenant and namespace. For example, an AMQP VHost named /vhost1/abc maps to the Pulsar tenant and namespace vhost1/abc.

If the VHost name is empty (/) or short (/HOSTNAME or HOSTNAME), then Starlight for RabbitMQ completes the mapping based on the following parameters:

AMQP VHost to Pulsar namespace mapping parameters
Name Default Description

amqpDefaultTenant

public

Default Pulsar tenant used to map empty or short VHosts.

amqpDefaultNamespace

default

Default Pulsar namespace used to map empty or short VHosts.

amqpMapShortVhostToTenant

false

Whether to prefer the amqpDefaultTenant or amqpDefaultNamespace when constructing the default mapping for short VHosts:

  • false (default): Short VHosts are mapped to a namespace on the default tenant. The value of amqpDefaultTenant is used as the tenant name and the short VHost name is used as the namespace name.

    This results in VHost-specific namespace names and a consistent tenant name.

  • true: Short VHosts are mapped to tenants using the default namespace. The short VHost name is used as the tenant name and the value of amqpDefaultNamespace is used as the namespace name.

    This results in VHost-specific tenant names and a consistent namespace name.

To further illustrate this concept, here is how Starlight for RabbitMQ handles different AMQP VHost names:

  • Empty VHost: An AMQP VHost / maps to amqpDefaultTenant/amqpDefaultNamespace. For example, with the default values, / maps to the Pulsar namespace public/default.

  • Short VHost: A short AMQP VHost, such as /HOSTNAME or HOSTNAME maps to amqpDefaultTenant/HOSTNAME by default. The value of amqpDefaultTenant is the Pulsar tenant name, and the VHost name is the namespace name. For example, if amqpDefaultTenant is set to public, then /vhost1 and vhost1 map to the Pulsar namespace public/vhost1.

    However, if amqpMapShortVhostToTenant is set to true, then the mapping is HOSTNAME/amqpDefaultNamespace. In this case, the VHost name is the Pulsar tenant name, and the value of amqpDefaultNamespace is the namespace name. For example, if amqpDefaultNamespace is set to default, then /vhost1 and vhost1 map to vhost1/default.

  • Full VHost: An AMQP VHost with who two segments, such as /HOSTNAME/HOSTNAME_SUFFIX or HOSTNAME/HOSTNAME_SUFFIX, maps directly to a Pulsar tenant and namespace. The first segment is the tenant name, and the second segment is the namespace name.

    In this case, Starlight for RabbitMQ doesn’t use amqpDefaultTenant or amqpDefaultNamespace because both names are explicitly provided.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

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: Contact IBM