diff --git a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitTemplate.java b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitTemplate.java index 5d2894c96..3de6bbe7f 100644 --- a/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitTemplate.java +++ b/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/core/RabbitTemplate.java @@ -633,6 +633,18 @@ public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.evaluationContext.addPropertyAccessor(new MapAccessor()); } + /** + * Return configured before post {@link MessagePostProcessor}s or {@code null}. + * @return configured before post {@link MessagePostProcessor}s or {@code null}. + * @since 3.2 + */ + @Nullable + public Collection getBeforePublishPostProcessors() { + return this.beforePublishPostProcessors != null + ? Collections.unmodifiableCollection(this.beforePublishPostProcessors) + : null; + } + /** * Set {@link MessagePostProcessor}s that will be invoked immediately before invoking * {@code Channel#basicPublish()}, after all other processing, except creating the