RabbitMQ Exception Translator (support/RabbitExceptionTranslator.java)

spring-amqp · spring-rabbit/src/main/java/org/springframework/amqp/rabbit/support/RabbitExceptionTranslator.java · java · Apache-2.0
infra, integration, chat, lang:java, fw:spring

Translates low-level RabbitMQ client exceptions into standardized Spring AMQP exceptions. Use this to simplify error handling in messaging-based 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 2002-present the original author or authors.
 */

package org.springframework.amqp.rabbit.support;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.ConnectException;
import java.util.concurrent.TimeoutException;

import com.rabbitmq.client.ConsumerCancelledException;
import com.rabbitmq.client.PossibleAuthenticationFailureException;
import com.rabbitmq.client.ShutdownSignalException;
import org.jspecify.annotations.Nullable;

import org.springframework.amqp.AmqpAuthenticationException;
import org.springframework.amqp.Amq

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

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

Get a free API key