Routing AMQP Connection Factory (client/SimpleRoutingAmqpConnectionFactory.java)

spring-amqp · spring-rabbitmq-client/src/main/java/org/springframework/amqp/rabbitmq/client/SimpleRoutingAmqpConnectionFactory.java · java · Apache-2.0
infra, integration, chat, lang:java, fw:spring

A Spring AMQP factory that dynamically selects connections based on thread-bound lookup keys. Use this to manage multi-tenant or multi-broker RabbitMQ routing in Spring applications.

// Source: https://github.com/spring-projects/spring-amqp | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/*
 * Copyright 2026-present the original author or authors.
 */

package org.springframework.amqp.rabbitmq.client;

import org.jspecify.annotations.Nullable;

import org.springframework.amqp.rabbit.connection.SimpleResourceHolder;

/**
 * An {@link AbstractRoutingAmqpConnectionFactory} implementation which gets a {@code lookupKey}
 * for the current {@link AmqpConnectionFactory} from a thread-bound resource by the key of the
 * instance of this {@link AmqpConnectionFactory}.
 *
 * @author Robin Collard
 *
 * @since 4.2
 *
 * @see SimpleResourceHolder
 */
public class SimpleRo

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key