|
|
|
@ -1,27 +1,9 @@ |
|
|
|
package com.qniao.dam.infrastructure.config; |
|
|
|
|
|
|
|
import com.qniao.ppf.infrastructure.constant.MqQueue; |
|
|
|
import com.qniao.ppf.infrastructure.constant.PrintingPackagingFactoryMqExchange; |
|
|
|
import org.springframework.amqp.core.Binding; |
|
|
|
import org.springframework.amqp.core.BindingBuilder; |
|
|
|
import org.springframework.amqp.core.FanoutExchange; |
|
|
|
import org.springframework.amqp.core.Queue; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
|
|
|
@Configuration |
|
|
|
public class RabbitmqConfig { |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
Binding paymentOrderPaidBinding() { |
|
|
|
return BindingBuilder.bind(new Queue(MqQueue.PAYMENT_ORDER_PAID)) |
|
|
|
.to(new FanoutExchange(PrintingPackagingFactoryMqExchange.PAYMENT_ORDER_PAID)); |
|
|
|
} |
|
|
|
|
|
|
|
@Bean |
|
|
|
Binding walletPaymentOrderPaidBinding() { |
|
|
|
return BindingBuilder.bind(new Queue(MqQueue.WALLET_PAYMENT_ORDER_PAID)) |
|
|
|
.to(new FanoutExchange(PrintingPackagingFactoryMqExchange.WALLET_PAYMENT_ORDER_PAID)); |
|
|
|
} |
|
|
|
} |