Primary-ized the simpleMessageListenerContainerCustomizer bean creation

This commit is contained in:
Hanelore.Ianoseck 2023-11-22 20:44:21 +02:00
parent 0b3cf27f13
commit fde6db8572

View File

@ -15,6 +15,7 @@ import org.springframework.boot.autoconfigure.amqp.RabbitTemplateCustomizer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import static com.knecon.fforesight.tenantcommons.ForwardTenantInterceptor.TENANT_HEADER_NAME;
@ -30,6 +31,7 @@ public class MultiTenancyMessagingConfiguration {
* us to define as many container customization points as needed.
*/
@Bean
@Primary
public ContainerCustomizer<SimpleMessageListenerContainer> simpleMessageListenerContainerCustomizer(
ObjectProvider<SimpleMessageListenerContainerCustomizer> customizers) {
return container -> customizers.orderedStream().forEach((customizer) -> customizer.customize(container));