spring boot 之Rabbitmq 基本配置
/*
* Copyright (c) 2017 4PX Information Technology Co.,Ltd. All rights reserved.
*/
package com.fpx.pcs.prealert.process.config;
import com.fpx.pcs.prealert.process.mq.receiver.CainiaoGlobalSortingcenterReceiver;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
import org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.esotericsoftware.kryo.serializers.FieldSerializer.Bind;
import com.fpx.pcs.prealert.process.dto.OutBoundConditionToMQNotifyDTO;
import com.fpx.pcs.prealert.process.mq.receiver.MessageReceiver;
import com.fpx.pcs.prealert.process.mq.receiver.PackageStatusNotifyReceiver;
import com.rabbitmq.client.AMQP.Channel;
/**
* @author linzhh
* @date 2017年7月3日
*/
@Configuration
public class MQConfig extends DeadLetterConfig {
@Value("${mq.host}")
private String mqHost;
@Value("${mq.username}")
private String mqUsername;
@Value("${mq.password}")
private String mqPassword;
@Value("${mq.virtualHost}")
private String mqVirtualHost;
@Value("${mq.requestedHeartBeat}")
private int requestedHeartBeat;
@Value("${mq.channelCacheSize}")
private int channelCacheSize;
@Value("${mq.exchange.orderExchange}")
private String orderExchangeName;
@Value("${mq.exchange.manageExchange}")
private String manageExchangeName;
@Value("${mq.exchange.csmExchange}")
private String csmExchangeName;
@Value("${mq.exchange.pcsExchange}")
private String pcsExchangeName;
@Value("${mq.queue.orderTakingQueue}")
private String orderTakingQueueName;
@Value("${mq.queue.packagePrealertQueue}")
private String packagePrealertQueueName;
@Value("${mq.queue.stockInDelegationQueue}")
private String stockInDelegationQueueName;
@Value("${mq.queue.packageOutboundQueue}")
private String packageOutboundQueueName;
@Value("${mq.queue.stockOutDelegationQueue}")
private String stockOutDelegationQueueName;
@Value("${mq.queue.schedultCommissionQueue}")
private String schedultCommissionQueueName;
@Value("${mq.queue.manageJobStatusQueue}")
private String manageJobStatusQueueName;
@Value("${mq.queue.pcsPackageMarkElectricQueue}")
private String pcsPackageMarkElectricQueueName;
/** 该消息用于处理订单状态变更后,通知仓库管理系统进行变更 */
@Value("${mq.queue.manageReceiveJobStatusQueue}")
private String manageReceiveJobStatusQueueName;
@Value("${mq.queue.orderExceptionNotifyQuene}")
private String orderExceptionNotifyQueneName;
@Value("${mq.queue.orderExceptionResultQuene}")
private String orderExceptionResultQueneName;
/**
* 门店超容处理完结消息通知仓库管理系统
*/
@Value("${mq.queue.overCapacityExceptionQueue}")
private String overCapacityExceptionQueueName;
@Value("${mq.queue.packageExceptionNotifyQuene}")
private String packageExceptionNotifyQueneName;
@Value("${mq.queue.packageExceptionResultQuene}")
private String packageExceptionResultQueneName;
@Value("${mq.queue.cancelOrderQueue}")
private String cancelOrderQueueName;
@Value("${mq.queue.noprealertConfirmQueue}")
private String noprealertConfirmQueueName;
@Value("${mq.queue.returnParcelQueue}")
private String returnParcelQueueName;
@Value("${mq.queue.pcsJobStockCheckQueue}")
private String pcsJobStockCheckQueueName;
@Value("${mq.queue.modifyOfficialTmallWeightQueue}")
private String modifyOfficialTmallWeightQueueName;
@Value("${mq.queue.pcsJobWarehouseDeliveryBatchCloseQueue}")
private String pcsJobWarehouseDeliveryBatchCloseQueueName;
/**
* 出库条件检查队列,在出库委托创建之后发出这个消息,异常处理完成后需要重新检查,也会发出这个消息
*/
@Value("${mq.queue.outBoundConditionCheckQueue}")
private String outBoundConditionCheckQueueName;
@Value("${mq.queue.getDispatchInfoQueue}")
private String getDispatchInfoQueueName;
@Value("${mq.queue.globalLinehaulAsnQueue}")
private String globalLinehaulAsnQueueName;
@Value("${mq.queue.pcsJobRejectReceiveQueue}")
private String pcsJobRejectReceiveQueueName;
@Value("${mq.queue.sendMobileMessageQueue}")
private String sendMobileMessageQueueName;
@Value("${mq.queue.sendCainiaoMessageQueue}")
private String sendCainiaoMessageQueueName;
/** 回传包裹状态消息给菜鸟 */
@Value("${mq.queue.sendCainiaoPackageMessageQueue}")
private String sendCainiaoPackageMessageQueueName;
/**回传二段订单状态给菜鸟*/
@Value("${mq.queue.sendCainiaoCarriageMessageQueue}")
private String sendCainiaoCarriageMessageQueueName;
@Value("${mq.queue.sendDepponMsgBodyMessageQueue}")
private String sendDepponMsgBodyMessageQueueName;
@Value("${mq.queue.afterOutSendMessageQueue}")
private String afterOutSendMessageQueueName;
@Value("${mq.queue.uploadTradePhotoQueue}")
private String uploadTradePhotoQueueName;
@Value("${mq.queue.sendTrackingBusinessQueue}")
private String sendTrackingBusinessQueueName;
@Value("${mq.queue.receiveXMSMQTrackQueue}")
private String receiveXMSMQTrackQueueName;
@Value("${mq.queue.sendDispatchPrealertInfoQueue}")
private String sendDispatchPrealertInfoQueueName;
@Value("${mq.queue.sendReturnParcelPrealertInfoQueue}")
private String sendReturnParcelPrealertInfoQueueName;
@Value("${mq.queue.noPrealertExceptionQueue}")
private String noPrealertExceptionQueueName;
@Value("${mq.queue.sendBatchCodePrealertInfoQueue}")
private String sendBatchCodePrealertInfoQueueName;
@Value("${mq.queue.checkContrabandQueue}")
private String checkContrabandQueueName;
@Value("${mq.queue.finishOrderExceptionTaskQueue}")
private String finishOrderExceptionTaskQueueName;
@Value("${mq.queue.waitOnShelvesMissionQueue}")
private String waitOnShelvesMissionQueueName;
@Value("${mq.queue.receivePCSQualityResultMQTrackQueue}")
private String receivePCSQualityResultMQTrackQueueName;
@Value("${mq.queue.sendMonitorPointQueue}")
private String sendMonitorPointQueueName;
@Value("${mq.queue.packageTrackTimeQueue}")
private String packageTrackTimeQueueName;
@Value("${mq.queue.packageQcSplitTrackTimeQueue}")
private String packageQcSplitTrackTimeQueueName;
@Value("${mq.queue.prepareSynchronizeOrderQueue}")
private String prepareSynchronizeOrderQueueName;
@Value("${mq.queue.synchronizeOrderQueue}")
private String synchronizeOrderQueueName;
@Value("${mq.queue.contrabandCheckQueue}")
private String contrabandCheckQueueName;
@Value("${mq.queue.noprealertRecognitionNotificationQueue}")
private String noprealertRecognitionNotificationQueueName;
@Value("${mq.queue.inBoundConditionCheckQueue}")
private String inBoundConditionCheckQueueName;
@Value("${mq.queue.sendOperateLogQueue}")
private String sendOperateLogQueueName;
@Value("${mq.queue.jobOrderRecoverMergeQueue}")
private String jobOrderRecoverMergeQueueName;
@Value("${mq.queue.jobPackageRecoverNormalQueue}")
private String jobPackageRecoverNormalQueueName;
@Value("${mq.queue.jobPackageSendWeightQueue}")
private String jobPackageSendWeightQueueName;
@Value("${mq.queue.rejectedPackageToProcessNotifyQueue}")
private String rejectedPackageToProcessNotifyQueueName;
@Value("${mq.queue.packageRelateOrderQueue}")
private String packageRelateOrderQueueName;
@Value("${mq.queue.pcsNoprealertPutawayQueue}")
private String pcsNoprealertPutawayQueueName;
@Value("${mq.queue.outVolumeReleaseContainerQueue}")
private String outVolumeReleaseContainerQueueName;
/**取号失败消息通知*/
@Value("${mq.queue.getFestFailNoticeQueue}")
private String getFestFailNoticeQueueName;
@Value("${mq.queue.pcsSendBillingRequestQueue}")
private String pcsSendBillingRequestQueueName;
@Value("${mq.queue.pcsReceiveBillingRequestQueue}")
private String pcsReceiveBillingRequestQueueName;
@Value("${mq.queue.pcsSendStatusParameterToBillingRequestQueue}")
private String pcsSendStatusParameterToBillingRequestQueueName;
@Value("${mq.queue.sortingCenterOrderInfoQueue}")
private String sortingCenterOrderInfoQueueName;
@Value("${mq.queue.sortingCenterCallBackQueue}")
private String sortingCenterCallBackQueueName;
@Value("${mq.queue.updateJobPackageSizeInfoQueue}")
private String updateJobPackageSizeInfoQueueName;
@Value("${mq.queue.jobOrderSendDelegationCodeUpateStatusQueue}")
private String jobOrderSendDelegationCodeUpateStatusQueueName;
/**订单已打单消息通知,组织消息数据同步到包裹*/
@Value("${mq.queue.orderPrintMessageSyncPackageQueue}")
private String orderPrintMessageSyncPackageQueueName;
@Value("${mq.queue.sendATGInOutToXMSQueue}")
private String sendATGInOutToXMSQueueName;
@Value("${mq.queue.packageStatusChangeMessageQueue}")
private String packageStatusChangeMessageQueueName;
@Bean
public ConnectionFactory connectionFactory() {
CachingConnectionFactory cachingConnectionFactory = new CachingConnectionFactory();
// cachingConnectionFactory.setHost(mqHost);
cachingConnectionFactory.setAddresses(mqHost);
cachingConnectionFactory.setUsername(mqUsername);
cachingConnectionFactory.setPassword(mqPassword);
cachingConnectionFactory.setVirtualHost(mqVirtualHost);
cachingConnectionFactory.setRequestedHeartBeat(requestedHeartBeat);
cachingConnectionFactory.setChannelCacheSize(channelCacheSize);
//在网上查到利用 channel 配置ACk的应答机制
//org.springframework.amqp.rabbit.connection.Connection connection=cachingConnectionFactory.createConnection();
//com.rabbitmq.client.Channel channel=connection.createChannel(false);
//channel.queueDeclare(queue, durable, exclusive, autoDelete, arguments)
return cachingConnectionFactory;
}
@Bean
public DirectExchange orderExchange() {
DirectExchange de = new DirectExchange(orderExchangeName);
// de.setDelayed(true);
// de.getArguments().put("x-delayed-type", "direct");
return de;
// x-delayed-message
}
@Bean
public DirectExchange manageExchange() {
DirectExchange de = new DirectExchange(manageExchangeName);
// de.setDelayed(true);
// de.getArguments().put("x-delayed-type", "direct");
return de;
// x-delayed-message
}
@Bean
public DirectExchange pcsExchange() {
DirectExchange de = new DirectExchange(pcsExchangeName);
return de;
}
@Bean
public Queue orderTakingQueue() {
// return new Queue(orderTakingQueueName);
return createQueue(orderTakingQueueName);
}
@Bean
public Queue contrabandCheckQueue() {
// return new Queue(orderTakingQueueName);
return createQueue(contrabandCheckQueueName);
}
@Bean
public Queue outBoundConditionCheckQueue() {
// return new Queue(orderTakingQueueName);
return createQueue(outBoundConditionCheckQueueName);
}
@Bean
public Queue packagePrealertQueue() {
// return new Queue(packagePrealertQueueName);
return createQueue(packagePrealertQueueName);
}
@Bean
public Queue stockInDelegationQueue() {
// return new Queue(stockInDelegationQueueName);
return createQueue(stockInDelegationQueueName);
}
@Bean
public Queue packageOutboundQueue() {
// return new Queue(packageOutboundQueueName);
return createQueue(packageOutboundQueueName);
}
@Bean
public Queue stockOutDelegationQueue() {
// return new Queue(stockOutDelegationQueueName);
return createQueue(stockOutDelegationQueueName);
}
@Bean
public Queue manageJobStatusQueue() {
// return new Queue(manageJobStatusQueueName);
return createQueue(manageJobStatusQueueName);
}
@Bean
public Queue schedultCommissionQueue() {
// return new Queue(schedultCommissionQueueName);
return createQueue(schedultCommissionQueueName);
}
@Bean
public Queue orderExceptionResultQuene() {
return createQueue(orderExceptionResultQueneName);
}
@Bean
public Queue packageExceptionResultQuene() {
return createQueue(packageExceptionResultQueneName);
}
@Bean
public Queue cancelOrderQueue() {
return createQueue(cancelOrderQueueName);
}
@Bean
public Queue returnParcelQueue() {
return createQueue(returnParcelQueueName);
}
@Bean
public Queue pcsJobStockCheckQueue() {
return createQueue(pcsJobStockCheckQueueName);
}
@Bean
public Queue pcsJobWarehouseDeliveryBatchCloseQueue() {
return createQueue(pcsJobWarehouseDeliveryBatchCloseQueueName);
}
@Bean
public Queue noprealertConfirmQueue() {
return createQueue(noprealertConfirmQueueName);
}
@Bean
public Queue getDispatchInfoQueue() {
return createQueue(getDispatchInfoQueueName);
}
@Bean
public Queue globalLinehaulAsnQueue() {
return createQueue(globalLinehaulAsnQueueName);
}
@Bean
public Queue pcsJobRejectReceiveQueue() {
return createQueue(pcsJobRejectReceiveQueueName);
}
@Bean
public Queue updateJobPackageSizeInfoQueue() {
return createQueue(updateJobPackageSizeInfoQueueName);
}
@Bean
public Queue sendMobileMessageQueue() {
return createQueue(sendMobileMessageQueueName);
}
@Bean
public Queue sendCainiaoMessageQueue() {
return createQueue(sendCainiaoMessageQueueName);
}
@Bean
public Queue sendCainiaoPackageMessageQueue() {
return createQueue(sendCainiaoPackageMessageQueueName);
}
@Bean
public Queue sendCainiaoCarriageMessageQueue() {
return createQueue(sendCainiaoCarriageMessageQueueName);
}
@Bean
public Queue sendDepponMsgBodyMessageQueue() {
return createQueue(sendDepponMsgBodyMessageQueueName);
}
@Bean
public Queue afterOutSendMessageQueue() {
return createQueue(afterOutSendMessageQueueName);
}
@Bean
public Queue uploadTradePhotoQueue() {
return createQueue(uploadTradePhotoQueueName);
}
@Bean
public Queue sendTrackingBusinessQueue() {
return createQueue(sendTrackingBusinessQueueName);
}
@Bean
public Queue receiveXMSMQTrackQueue() {
return createQueue(receiveXMSMQTrackQueueName);
}
@Bean
public Queue sendDispatchPrealertInfoQueue() {
return createQueue(sendDispatchPrealertInfoQueueName);
}
@Bean
public Queue sendBatchCodePrealertInfoQueue() {
return createQueue(sendBatchCodePrealertInfoQueueName);
}
@Bean
public Queue sendReturnParcelPrealertInfoQueue() {
return createQueue(sendReturnParcelPrealertInfoQueueName);
}
@Bean
public Queue checkContrabandQueue() {
return createQueue(checkContrabandQueueName);
}
@Bean
public Queue overCapacityExceptionQueue() {
// return new Queue(overCapacityExceptionQueueName);
return createQueue(overCapacityExceptionQueueName);
}
@Bean
public Queue waitOnShelvesMissionQueue() {
// return new Queue(overCapacityExceptionQueueName);
return createQueue(waitOnShelvesMissionQueueName);
}
@Bean
public Queue receivePCSQualityResultMQTrackQueue() {
// return new Queue(overCapacityExceptionQueueName);
return createQueue(receivePCSQualityResultMQTrackQueueName);
}
@Bean
public Queue manageReceiveJobStatusQueue() {
// return new Queue(overCapacityExceptionQueueName);
return createQueue(manageReceiveJobStatusQueueName);
}
@Bean
public Queue packageTrackTimeQueue() {
return createQueue(packageTrackTimeQueueName);
}
@Bean
public Queue modifyOfficialTmallWeightQueue() {
return createQueue(modifyOfficialTmallWeightQueueName);
}
@Bean
public Queue packageQcSplitTrackTimeQueue() {
return createQueue(packageQcSplitTrackTimeQueueName);
}
@Bean
public Queue prepareSynchronizeOrderQueue() {
return createQueue(prepareSynchronizeOrderQueueName);
}
@Bean
public Queue synchronizeOrderQueue() {
return createQueue(synchronizeOrderQueueName);
}
@Bean
public Queue pcsPackageMarkElectricQueue(){
return createQueue(pcsPackageMarkElectricQueueName);
}
@Bean
public Queue inBoundConditionCheckQueue() {
//return new Queue(pcsRejectScanQueueName);
return createQueue(inBoundConditionCheckQueueName);
}
@Bean
public Queue noprealertRecognitionNotificationQueue() {
//return new Queue(pcsRejectScanQueueName);
return createQueue(noprealertRecognitionNotificationQueueName);
}
@Bean
public Queue sendOperateLogQueue() {
//return new Queue(pcsRejectScanQueueName);
return createQueue(sendOperateLogQueueName);
}
@Bean
public Queue jobOrderRecoverMergeQueue(){
return createQueue(jobOrderRecoverMergeQueueName);
}
@Bean
public Queue jobPackageRecoverNormalQueue(){
return createQueue(jobPackageRecoverNormalQueueName);
}
@Bean
public Queue jobPackageSendWeightQueue(){
return createQueue(jobPackageSendWeightQueueName);
}
@Bean
public Queue pcsSendBillingRequestQueue(){
return createQueue(pcsSendBillingRequestQueueName);
}
@Bean
public Queue pcsReceiveBillingRequestQueue(){
return createQueue(pcsReceiveBillingRequestQueueName);
}
@Bean
public Queue pcsSendStatusParameterToBillingRequestQueue(){
return createQueue(pcsSendStatusParameterToBillingRequestQueueName);
}
@Bean Queue rejectedPackageToProcessNotifyQueue(){
return createQueue(rejectedPackageToProcessNotifyQueueName);
}
@Bean
public Queue packageRelateOrderQueue(){
return createQueue(packageRelateOrderQueueName);
}
@Bean
public Queue pcsNoprealertPutawayQueue(){
return createQueue(pcsNoprealertPutawayQueueName);
}
@Bean
public Queue outVolumeReleaseContainerQueue(){
return createQueue(outVolumeReleaseContainerQueueName);
}
@Bean
public Queue getFestFailNoticeQueue(){
return createQueue(getFestFailNoticeQueueName);
}
@Bean
public Queue sortingCenterOrderInfoQueue() {
return createQueue(sortingCenterOrderInfoQueueName);
}
@Bean
public Queue sortingCenterCallBackQueue() {
return createQueue(sortingCenterCallBackQueueName);
}
@Bean
public Queue jobOrderSendDelegationCodeUpateStatusQueue() {
return createQueue(jobOrderSendDelegationCodeUpateStatusQueueName);
}
@Bean
public Queue sendATGInOutToXMSQueue() {
return createQueue(sendATGInOutToXMSQueueName);
}
@Bean
public Queue orderPrintMessageSyncPackageQueue(){
return createQueue(orderPrintMessageSyncPackageQueueName);
}
@Bean
public Queue packageStatusChangeMessageQueue(){
return createQueue(packageStatusChangeMessageQueueName);
}
@Bean
public Binding contrabandCheckQueueBinding(Queue contrabandCheckQueue, DirectExchange manageExchange) {
Binding binding = BindingBuilder.bind(contrabandCheckQueue).to(manageExchange)
.with(contrabandCheckQueueName);
// binding.getArguments().put("x-delayed-type", "direct");
return binding;
}
@Bean
public Binding modifyOfficialTmallWeightQueueBinding(Queue modifyOfficialTmallWeightQueue, DirectExchange manageExchange) {
Binding binding = BindingBuilder.bind(modifyOfficialTmallWeightQueue).to(manageExchange)
.with(modifyOfficialTmallWeightQueueName);
return binding;
}
@Bean
public Binding manageReceiveJobStatusQueueBinding(Queue manageReceiveJobStatusQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(manageReceiveJobStatusQueue).to(orderExchange)
.with(manageReceiveJobStatusQueueName);
// binding.getArguments().put("x-delayed-type", "direct");
return binding;
}
@Bean
public Binding orderTakingQueueBinding(Queue orderTakingQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(orderTakingQueue).to(orderExchange).with(orderTakingQueueName);
// binding.getArguments().put("x-delayed-type", "direct");
return binding;
}
@Bean
public Binding globalHaulAsnQueueBinding(Queue globalLinehaulAsnQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(globalLinehaulAsnQueue).to(orderExchange).with(globalLinehaulAsnQueueName);
}
@Bean
public Binding pcsJobRejectReceiveQueueBinding(Queue pcsJobRejectReceiveQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(pcsJobRejectReceiveQueue).to(orderExchange).with(pcsJobRejectReceiveQueueName);
}
@Bean
public Binding packagePrealertQueueBinding(Queue packagePrealertQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(packagePrealertQueue).to(orderExchange).with(packagePrealertQueueName);
}
@Bean
public Binding stockInDelegationQueueBinding(Queue stockInDelegationQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(stockInDelegationQueue).to(orderExchange).with(stockInDelegationQueueName);
}
@Bean
public Binding packageOutboundQueueBinding(Queue packageOutboundQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(packageOutboundQueue).to(orderExchange).with(packageOutboundQueueName);
}
@Bean
public Binding stockOutDelegationQueueBinding(Queue stockOutDelegationQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(stockOutDelegationQueue).to(orderExchange).with(stockOutDelegationQueueName);
}
@Bean
public Binding manageJobStatusQueueBinding(Queue manageJobStatusQueue, DirectExchange manageExchange) {
return BindingBuilder.bind(manageJobStatusQueue).to(manageExchange).with(manageJobStatusQueueName);
}
@Bean
public Binding schedultCommissionQueueBinding(Queue schedultCommissionQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(schedultCommissionQueue).to(orderExchange).with(schedultCommissionQueueName);
}
@Bean
public Binding orderExceptionResultQueneBinding(Queue orderExceptionResultQuene, DirectExchange orderExchange) {
return BindingBuilder.bind(orderExceptionResultQuene).to(orderExchange).with(orderExceptionResultQueneName);
}
@Bean
public Binding packageExceptionResultQueneBinding(Queue packageExceptionResultQuene, DirectExchange orderExchange) {
return BindingBuilder.bind(packageExceptionResultQuene).to(orderExchange).with(packageExceptionResultQueneName);
}
@Bean
public Binding cancelOrderQueueBinding(Queue cancelOrderQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(cancelOrderQueue).to(pcsExchange).with(cancelOrderQueueName);
}
@Bean
public Binding updateJobPackageSizeInfoQueueBinding(Queue updateJobPackageSizeInfoQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(updateJobPackageSizeInfoQueue).to(pcsExchange).with(updateJobPackageSizeInfoQueueName);
}
@Bean
public Binding returnParcelQueueBinding(Queue returnParcelQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(returnParcelQueue).to(orderExchange).with(returnParcelQueueName);
}
@Bean
public Binding pcsJobStockCheckQueueBinding(Queue pcsJobStockCheckQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(pcsJobStockCheckQueue).to(pcsExchange).with(pcsJobStockCheckQueueName);
}
@Bean
public Binding pcsJobWarehouseDeliveryBatchCloseQueueBinding(Queue pcsJobWarehouseDeliveryBatchCloseQueue,
DirectExchange pcsExchange) {
return BindingBuilder.bind(pcsJobWarehouseDeliveryBatchCloseQueue).to(pcsExchange)
.with(pcsJobWarehouseDeliveryBatchCloseQueueName);
}
@Bean
public Binding noprealertQueryConfirmQueueBinding(Queue noprealertConfirmQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(noprealertConfirmQueue).to(pcsExchange).with(noprealertConfirmQueueName);
}
@Bean
public Binding getDispatchInfoQueueBinding(Queue getDispatchInfoQueue, DirectExchange orderExchange) {
return BindingBuilder.bind(getDispatchInfoQueue).to(orderExchange).with(getDispatchInfoQueueName);
}
@Bean
public Binding outBoundConditionCheckQueueBinding(Queue outBoundConditionCheckQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(outBoundConditionCheckQueue).to(pcsExchange).with(outBoundConditionCheckQueueName);
}
@Bean
public Binding pcsPackageMarkElectricQueueBinding(Queue pcsPackageMarkElectricQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(pcsPackageMarkElectricQueue).to(pcsExchange).with(pcsPackageMarkElectricQueueName);
}
@Bean
public Binding pcsNoprealertPutawayQueueBinding(Queue pcsNoprealertPutawayQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(pcsNoprealertPutawayQueue).to(pcsExchange).with(pcsNoprealertPutawayQueueName);
}
@Bean
public Binding getFestFailNoticeQueueBinding(Queue getFestFailNoticeQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(getFestFailNoticeQueue).to(pcsExchange).with(getFestFailNoticeQueueName);
}
@Bean
public Binding overCapacitySendMobileMessageQueueBinding(Queue sendMobileMessageQueue,
DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendMobileMessageQueue).to(orderExchange)
.with(sendMobileMessageQueueName);
return binding;
}
@Bean
public Binding sendCainiaoMessageQueueBinding(Queue sendCainiaoMessageQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendCainiaoMessageQueue).to(orderExchange)
.with(sendCainiaoMessageQueueName);
return binding;
}
@Bean
public Binding sendCainiaoPackageMessageQueueBinding(Queue sendCainiaoPackageMessageQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendCainiaoPackageMessageQueue).to(orderExchange)
.with(sendCainiaoPackageMessageQueueName);
return binding;
}
@Bean
public Binding sendCainiaoCarriageMessageQueueBinding(Queue sendCainiaoCarriageMessageQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendCainiaoCarriageMessageQueue).to(orderExchange)
.with(sendCainiaoCarriageMessageQueueName);
return binding;
}
@Bean
public Binding sendDepponMsgBodyMessageQueueBinding(Queue sendDepponMsgBodyMessageQueue,
DirectExchange pcsExchange) {
Binding binding = BindingBuilder.bind(sendDepponMsgBodyMessageQueue).to(pcsExchange)
.with(sendDepponMsgBodyMessageQueueName);
return binding;
}
@Bean
public Binding afterOutSendMessageQueueBinding(Queue afterOutSendMessageQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(afterOutSendMessageQueue).to(orderExchange)
.with(afterOutSendMessageQueueName);
return binding;
}
@Bean
public Binding uploadTradePhotoQueueBinding(Queue uploadTradePhotoQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(uploadTradePhotoQueue).to(orderExchange).with(uploadTradePhotoQueueName);
return binding;
}
@Bean
public Binding sendTrackingBusinessQueueBinding(Queue sendTrackingBusinessQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendTrackingBusinessQueue).to(orderExchange)
.with(sendTrackingBusinessQueueName);
return binding;
}
@Bean
public Binding receiveXMSMQTrackQueueBinding(Queue receiveXMSMQTrackQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(receiveXMSMQTrackQueue).to(orderExchange)
.with(receiveXMSMQTrackQueueName);
return binding;
}
@Bean
public Binding sendDispatchPrealertInfoQueueBinding(Queue sendDispatchPrealertInfoQueue,
DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendDispatchPrealertInfoQueue).to(orderExchange)
.with(sendDispatchPrealertInfoQueueName);
return binding;
}
@Bean
public Binding sendBatchCodePrealertInfoQueueBinding(Queue sendBatchCodePrealertInfoQueue,
DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendBatchCodePrealertInfoQueue).to(orderExchange)
.with(sendBatchCodePrealertInfoQueueName);
return binding;
}
@Bean
public Binding sendReturnParcelPrealertInfoQueueBinding(Queue sendReturnParcelPrealertInfoQueue,
DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(sendReturnParcelPrealertInfoQueue).to(orderExchange)
.with(sendReturnParcelPrealertInfoQueueName);
return binding;
}
@Bean
public Binding overCapacityExceptionQueueBinding(Queue overCapacityExceptionQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(overCapacityExceptionQueue).to(pcsExchange).with(overCapacityExceptionQueueName);
}
@Bean
public Binding receivePCSQualityResultMQTrackQueueBinding(Queue receivePCSQualityResultMQTrackQueue,
DirectExchange pcsExchange) {
return BindingBuilder.bind(receivePCSQualityResultMQTrackQueue).to(pcsExchange)
.with(receivePCSQualityResultMQTrackQueueName);
}
@Bean
public Binding packageTrackTimeQueueBinding(Queue packageTrackTimeQueue,
DirectExchange pcsExchange) {
return BindingBuilder.bind(packageTrackTimeQueue).to(pcsExchange)
.with(packageTrackTimeQueueName);
}
@Bean
public Binding packageQcSplitTrackTimeQueueBinding(Queue packageQcSplitTrackTimeQueue,
DirectExchange pcsExchange) {
return BindingBuilder.bind(packageQcSplitTrackTimeQueue).to(pcsExchange)
.with(packageQcSplitTrackTimeQueueName);
}
@Bean
public Binding prepareSynchronizeOrderQueueBinding(Queue prepareSynchronizeOrderQueue,
DirectExchange pcsExchange) {
return BindingBuilder.bind(prepareSynchronizeOrderQueue).to(pcsExchange)
.with(prepareSynchronizeOrderQueueName);
}
@Bean
public Binding sortingCenterCallBackQueueBinding(Queue sortingCenterCallBackQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(sortingCenterCallBackQueue).to(pcsExchange).with(sortingCenterCallBackQueueName);
}
@Bean
public Binding sortingCenterOrderInfoQueueBinding(Queue sortingCenterOrderInfoQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(sortingCenterOrderInfoQueue).to(pcsExchange).with(sortingCenterOrderInfoQueueName);
}
@Bean
public SimpleMessageListenerContainer pcsPackageMarkElectricQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsPackageMarkElectricQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receivePackageMarkElectriMsg"));
return container;
}
@Bean
public Binding noprealertRecognitionNotificationQueueBinding(Queue noprealertRecognitionNotificationQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(noprealertRecognitionNotificationQueue).to(pcsExchange).with(noprealertRecognitionNotificationQueueName);
}
@Bean
public Binding inBoundConditionCheckQueueBinding(Queue inBoundConditionCheckQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(inBoundConditionCheckQueue).to(pcsExchange).with(inBoundConditionCheckQueueName);
}
@Bean
public Binding sendOperateLogQueueBinding(Queue sendOperateLogQueue, DirectExchange pcsExchange) {
return BindingBuilder.bind(sendOperateLogQueue).to(pcsExchange).with(sendOperateLogQueueName);
}
@Bean
public Binding jobOrderRecoverMergeQueueBinding(Queue jobOrderRecoverMergeQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(jobOrderRecoverMergeQueue).to(pcsExchange).with(jobOrderRecoverMergeQueueName);
}
@Bean
public Binding jobPackageRecoverNormalQueueBinding(Queue jobPackageRecoverNormalQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(jobPackageRecoverNormalQueue).to(pcsExchange).with(jobPackageRecoverNormalQueueName);
}
@Bean
public Binding jobPackageSendWeightQueueBinding(Queue jobPackageSendWeightQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(jobPackageSendWeightQueue).to(pcsExchange).with(jobPackageSendWeightQueueName);
}
@Bean
public Binding pcsSendBillingRequestQueueBinding(Queue pcsSendBillingRequestQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(pcsSendBillingRequestQueue).to(pcsExchange).with(pcsSendBillingRequestQueueName);
}
@Bean
public Binding pcsReceiveBillingRequestQueueBinding(Queue pcsReceiveBillingRequestQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(pcsReceiveBillingRequestQueue).to(pcsExchange).with(pcsReceiveBillingRequestQueueName);
}
@Bean
public Binding pcsSendStatusParameterToBillingRequestQueueBinding(Queue pcsSendStatusParameterToBillingRequestQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(pcsSendStatusParameterToBillingRequestQueue).to(pcsExchange).with(pcsSendStatusParameterToBillingRequestQueueName);
}
@Bean
public Binding rejectedPackageToProcessNotifyQueueBinding(Queue rejectedPackageToProcessNotifyQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(rejectedPackageToProcessNotifyQueue).to(pcsExchange).with(rejectedPackageToProcessNotifyQueueName);
}
@Bean
public Binding packageRelateOrderQueueBinding(Queue packageRelateOrderQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(packageRelateOrderQueue).to(pcsExchange).with(packageRelateOrderQueueName);
}
@Bean
public Binding outVolumeReleaseContainerQueueBinding(Queue outVolumeReleaseContainerQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(outVolumeReleaseContainerQueue).to(pcsExchange).with(outVolumeReleaseContainerQueueName);
}
@Bean
public Binding jobOrderSendDelegationCodeUpateStatusQueueBinding(Queue jobOrderSendDelegationCodeUpateStatusQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(jobOrderSendDelegationCodeUpateStatusQueue).to(pcsExchange).with(jobOrderSendDelegationCodeUpateStatusQueueName);
}
@Bean
public Binding sendATGInOutToXMSQueueBinding(Queue sendATGInOutToXMSQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(sendATGInOutToXMSQueue).to(pcsExchange).with(sendATGInOutToXMSQueueName);
}
@Bean
public Binding orderPrintMessageSyncPackageQueueBinding(Queue orderPrintMessageSyncPackageQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(orderPrintMessageSyncPackageQueue).to(pcsExchange).with(orderPrintMessageSyncPackageQueueName);
}
@Bean
public Binding packageStatusChangeMessageQueueBinding(Queue packageStatusChangeMessageQueue,DirectExchange pcsExchange){
return BindingBuilder.bind(packageStatusChangeMessageQueue).to(pcsExchange).with(packageStatusChangeMessageQueueName);
}
@Bean
public SimpleMessageListenerContainer globalLinehaulAsnQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(globalLinehaulAsnQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveGlobalLinhaulAsnMsg"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer pkgQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(orderTakingQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveOrderInfo"));
container.setConcurrentConsumers(32);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer packagePrealertQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(packagePrealertQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receivePackagePrealert"));
return container;
}
@Bean
public SimpleMessageListenerContainer stockInDelegationQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(stockInDelegationQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveStockInDelegation"));
container.setConcurrentConsumers(2);
container.setPrefetchCount(5);
return container;
}
// @Bean
// public SimpleMessageListenerContainer
// packageOutboundQueueListenerContainer(ConnectionFactory
// connectionFactory,
// MessageReceiver messageReceiver) {
// SimpleMessageListenerContainer container = new
// SimpleMessageListenerContainer();
// container.setConnectionFactory(connectionFactory);
// container.setQueueNames(packageOutboundQueueName);
// container.setMessageListener(new MessageListenerAdapter(messageReceiver,
// "receivePackageOutbound"));
// return container;
// }
@Bean
public SimpleMessageListenerContainer stockOutDelegationQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(stockOutDelegationQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveStockOutDelegation"));
return container;
}
@Bean
public SimpleMessageListenerContainer pcsJobStatusQueueListenerContainer(ConnectionFactory connectionFactory,
PackageStatusNotifyReceiver packageStatusNotifyReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(manageJobStatusQueueName);
container.setMessageListener(new MessageListenerAdapter(packageStatusNotifyReceiver, "receiveMessage"));
container.setConcurrentConsumers(12);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer orderExceptionResultQueneListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(orderExceptionResultQueneName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveOrderExceptionResult"));
return container;
}
@Bean
public SimpleMessageListenerContainer packageExceptionResultQueneListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(packageExceptionResultQueneName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receivePackageExceptionResult"));
return container;
}
@Bean
public SimpleMessageListenerContainer pcsJobStockCheckQueneListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsJobStockCheckQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveLessParcelAlreadyFind"));
return container;
}
@Bean
public SimpleMessageListenerContainer updateJobPackageSizeInfoQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(updateJobPackageSizeInfoQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveupdateJobPackageSizeInfo"));
return container;
}
@Bean
public SimpleMessageListenerContainer pcsJobWarehouseDeliveryBatchCloseQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsJobWarehouseDeliveryBatchCloseQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveWarehouseDeliveryBatchClose"));
return container;
}
@Bean
public Binding checkContrabandQueueBinding(Queue checkContrabandQueue, DirectExchange orderExchange) {
Binding binding = BindingBuilder.bind(checkContrabandQueue).to(orderExchange).with(checkContrabandQueueName);
return binding;
}
@Bean
public SimpleMessageListenerContainer outBoundConditionCheckQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(outBoundConditionCheckQueueName);
container
.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveOutBoundConditionCheckNotify"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(3);
return container;
}
@Bean
public SimpleMessageListenerContainer getDispatchInfoQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(getDispatchInfoQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveGetDispatchInfo"));
container.setConcurrentConsumers(10);
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer pcsJobRejectReceiveQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsJobRejectReceiveQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "pcsJobRejectReceive"));
return container;
}
@Bean
public SimpleMessageListenerContainer overCapacitySendMobileMessageQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendMobileMessageQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveSendMobileMessage"));
container.setConcurrentConsumers(3);
container.setPrefetchCount(3);
return container;
}
@Deprecated
@Bean
public SimpleMessageListenerContainer sendCainiaoMessageQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendCainiaoMessageQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveSendCainiaoMessage"));
container.setConcurrentConsumers(1);
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer sendCainiaoPackageMessageQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendCainiaoPackageMessageQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveSendCainiaoPackageMessage"));
container.setConcurrentConsumers(10);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer sendCainiaoCarriageMessageQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendCainiaoCarriageMessageQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveSendCainiaoCarriageMessage"));
container.setConcurrentConsumers(10);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer afterOutSendMessageQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(afterOutSendMessageQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveAfterOutSendMessage"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(10);
return container;
}
@Bean
public SimpleMessageListenerContainer uploadTradePhotoQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(uploadTradePhotoQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiverUploadTradePhotoMessage"));
return container;
}
@Bean
public SimpleMessageListenerContainer sendTrackingBusinessQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendTrackingBusinessQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "sendTrackingBusiness"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer receiveXMSMQTrackQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(receiveXMSMQTrackQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveXMSMQTrack"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer sendDispatchPrealertInfoQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendDispatchPrealertInfoQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiverSendDispatchPrealertInfo"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer sendBatchCodePrealertInfoQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendBatchCodePrealertInfoQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiverBatchCodePrealertInfo"));
container.setConcurrentConsumers(5);
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer sendReturnParcelPrealertInfoQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendReturnParcelPrealertInfoQueueName);
container.setMessageListener(
new MessageListenerAdapter(messageReceiver, "receiverSendReturnParcelPrealertInfo"));
return container;
}
@Bean
public SimpleMessageListenerContainer checkContrabandQueueListenerContainer(ConnectionFactory connectionFactory,
MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(checkContrabandQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveCheckContraband"));
container.setConcurrentConsumers(2);
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer pcsQualityResultMQTrackQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(receivePCSQualityResultMQTrackQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receivePCSQualityResult"));
container.setConcurrentConsumers(2);
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer packageQcSplitTrackTimeQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(packageQcSplitTrackTimeQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receivePackageQcSplitTrackTime"));
return container;
}
@Bean
public SimpleMessageListenerContainer packageTrackTimeQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(packageTrackTimeQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receivePackageTrackTime"));
container.setPrefetchCount(5);
return container;
}
@Bean
public SimpleMessageListenerContainer prepareSynchronizeOrderQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(prepareSynchronizeOrderQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiverPrepareSynchronizeOrder"));
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer syncNoPrealetRecognitionResultQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(noprealertRecognitionNotificationQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveSyncNoPrealetRecognitionResult"));
return container;
}
@Bean
public SimpleMessageListenerContainer inBoundConditionCheckQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(inBoundConditionCheckQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveInBoundConditionCheckMessage"));
return container;
}
@Bean
public SimpleMessageListenerContainer sendOperateLogQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(sendOperateLogQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiverOperateLog"));
return container;
}
@Bean
public SimpleMessageListenerContainer modifyOfficialTmallWeightQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(modifyOfficialTmallWeightQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiverModifyOfficialTmallWeight"));
return container;
}
@Bean
public SimpleMessageListenerContainer jobOrderRecoverMergeQueueListenerContainer(
ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(jobOrderRecoverMergeQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver, "receiveJobOrderRecoverMergeMessage"));
return container;
}
@Bean
public SimpleMessageListenerContainer jobPackageRecoverNormalQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(jobPackageRecoverNormalQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receiveJobPackageRecoverNormal"));
return container;
}
@Bean
public SimpleMessageListenerContainer jobPackageSendWeightQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(jobPackageSendWeightQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receiveJobPackageSendWeight"));
return container;
}
@Bean
public SimpleMessageListenerContainer pcsReceiveBillingRequestQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsReceiveBillingRequestQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receiveBillingRequestFee"));
return container;
}
@Bean
public SimpleMessageListenerContainer pcsSendStatusParameterToBillingRequestQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsSendStatusParameterToBillingRequestQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receiveStatusParameterToBillingRequest"));
return container;
}
@Bean
public SimpleMessageListenerContainer jobPcsNoprealertPutawayQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(pcsNoprealertPutawayQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receiveNoprealertPutaway"));
return container;
}
@Bean
public SimpleMessageListenerContainer rejectedPackageToProcessNotifyQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(rejectedPackageToProcessNotifyQueueName);
container.setMessageListener(new MessageListenerAdapter(messageReceiver,"receiveRejectedPackageToProcess"));
return container;
}
@Bean
public SimpleMessageListenerContainer packageRelateOrderQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(packageRelateOrderQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receivePackageRelateOrder"));
container.setPrefetchCount(4);
return container;
}
@Bean
public SimpleMessageListenerContainer getFestFailNoticeQueueListenerContainer(ConnectionFactory connectionFactory,MessageReceiver messageReceiver){
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(getFestFailNoticeQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver,"receivegetFestFailNotice"));
container.setPrefetchCount(2);
return container;
}
// @Bean
// public SimpleMessageListenerContainer getCgsonQueueListenerContainer(ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
// SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
// container.setConnectionFactory(connectionFactory);
// container.setQueueNames(getCgsonQueueName());
// container.setupMessageListener(new MessageListenerAdapter(messageReceiver, "receiveSortingCenterOrderInfo"));
// container.setPrefetchCount(2);
// return container;
// }
@Bean
public SimpleMessageListenerContainer getSortingCenterOrderInfoQueueListenerContainer(ConnectionFactory connectionFactory, CainiaoGlobalSortingcenterReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(getSortingCenterOrderInfoQueueName());
container.setupMessageListener(new MessageListenerAdapter(messageReceiver, "receiveCainiaoGlobal"));
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer getSortingCenterCallBackQueueListenerContainer(ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(getSortingCenterCallBackQueueName());
container.setupMessageListener(new MessageListenerAdapter(messageReceiver, "xxx"));
container.setPrefetchCount(2);
return container;
}
@Bean
public SimpleMessageListenerContainer jobOrderSendDelegationCodeUpateStatusQueueListenerContainer(ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(jobOrderSendDelegationCodeUpateStatusQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver, "receiveJobOrderSendOrderDelegationCodeUpdateOrderCarriageStatus"));
return container;
}
@Bean
public SimpleMessageListenerContainer orderPrintMessageSyncPackageQueueListenerContainer(ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(orderPrintMessageSyncPackageQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver, "receiveOrderPrintMessage"));
return container;
}
@Bean
public SimpleMessageListenerContainer packageStatusChangeMessageQueueListenerContainer(ConnectionFactory connectionFactory, MessageReceiver messageReceiver) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(packageStatusChangeMessageQueueName);
container.setupMessageListener(new MessageListenerAdapter(messageReceiver, "receivePackageStatusChangeMessage"));
return container;
}
public String getOrderExchangeName() {
return orderExchangeName;
}
public String getcsJobRejectReceiveQueueName() {
return pcsJobRejectReceiveQueueName;
}
public void setOrderExchangeName(String orderExchangeName) {
this.orderExchangeName = orderExchangeName;
}
public String getManageExchangeName() {
return manageExchangeName;
}
public void setManageExchangeName(String manageExchangeName) {
this.manageExchangeName = manageExchangeName;
}
public String getCsmExchangeName() {
return csmExchangeName;
}
public String getPcsExchangeName() {
return pcsExchangeName;
}
public String getOrderTakingQueueName() {
return orderTakingQueueName;
}
public void setOrderTakingQueueName(String orderTakingQueueName) {
this.orderTakingQueueName = orderTakingQueueName;
}
public String getPackagePrealertQueueName() {
return packagePrealertQueueName;
}
public String getStockInDelegationQueueName() {
return stockInDelegationQueueName;
}
public String getPackageOutboundQueueName() {
return packageOutboundQueueName;
}
public String getStockOutDelegationQueueName() {
return stockOutDelegationQueueName;
}
public String getSchedultCommissionQueueName() {
return schedultCommissionQueueName;
}
public String getManageJobStatusQueueName() {
return manageJobStatusQueueName;
}
public String getOrderExceptionResultQueneName() {
return orderExceptionResultQueneName;
}
public String getPackageExceptionResultQueneName() {
return packageExceptionResultQueneName;
}
public String getOrderExceptionNotifyQueneName() {
return orderExceptionNotifyQueneName;
}
public String getPackageExceptionNotifyQueneName() {
return packageExceptionNotifyQueneName;
}
public String getCancelOrderQueueName() {
return cancelOrderQueueName;
}
public String getReturnParcelQueueName() {
return returnParcelQueueName;
}
public String getPcsJobStockCheckQueueName() {
return pcsJobStockCheckQueueName;
}
public String getNoprealertConfirmQueueName() {
return noprealertConfirmQueueName;
}
public String getPcsJobWarehouseDeliveryBatchCloseQueueName() {
return pcsJobWarehouseDeliveryBatchCloseQueueName;
}
public String getOutBoundConditionCheckQueueName() {
return outBoundConditionCheckQueueName;
}
public String getGetDispatchInfoQueueName() {
return getDispatchInfoQueueName;
}
public String getSendMobileMessageQueueName() {
return sendMobileMessageQueueName;
}
public String getSendCainiaoMessageQueueName() {
return sendCainiaoMessageQueueName;
}
public String getSendCainiaoPackageMessageQueueName() {
return sendCainiaoPackageMessageQueueName;
}
public String getSendCainiaoCarriageMessageQueueName() {
return sendCainiaoCarriageMessageQueueName;
}
public String getSendDepponMsgBodyMessageQueueName() {
return sendDepponMsgBodyMessageQueueName;
}
public String getAfterOutSendMessageQueueName() {
return afterOutSendMessageQueueName;
}
public String getsendTrackingBusinessQueueName() {
return sendTrackingBusinessQueueName;
}
public String getreceiveXMSMQTrackQueueName() {
return receiveXMSMQTrackQueueName;
}
public String getsendDispatchPrealertInfoQueueName() {
return sendDispatchPrealertInfoQueueName;
}
public String getsendBatchCodePrealertInfoQueueName() {
return sendBatchCodePrealertInfoQueueName;
}
public String getsendReturnParcelPrealertInfoQueueName() {
return sendReturnParcelPrealertInfoQueueName;
}
public String getNoPrealertExceptionQueueName() {
return noPrealertExceptionQueueName;
}
public String getCheckContrabandQueueName() {
return checkContrabandQueueName;
}
public String getOverCapacityExceptionQueueName() {
return overCapacityExceptionQueueName;
}
public void setOverCapacityExceptionQueueName(String overCapacityExceptionQueueName) {
this.overCapacityExceptionQueueName = overCapacityExceptionQueueName;
}
public String getWaitOnShelvesMissionQueueName() {
return waitOnShelvesMissionQueueName;
}
public String getFinishOrderExceptionTaskQueueName() {
return finishOrderExceptionTaskQueueName;
}
public String getReceivePCSQualityResultMQTrackQueueName() {
return receivePCSQualityResultMQTrackQueueName;
}
public String getManageReceiveJobStatusQueueName() {
return manageReceiveJobStatusQueueName;
}
public String getSendMonitorPointQueueName() {
return sendMonitorPointQueueName;
}
public String getPcsSendBillingRequestQueueName() {
return pcsSendBillingRequestQueueName;
}
public String getPcsReceiveBillingRequestQueueName() {
return pcsReceiveBillingRequestQueueName;
}
public String getPcsSendStatusParameterToBillingRequestQueueName() {
return pcsSendStatusParameterToBillingRequestQueueName;
}
public String getPackageTrackTimeQueueName() {
return packageTrackTimeQueueName;
}
public String getPackageQcSplitTrackTimeQueueName() {
return packageQcSplitTrackTimeQueueName;
}
public String getSynchronizeOrderQueueName() {
return synchronizeOrderQueueName;
}
public String getPrepareSynchronizeOrderQueueName() {
return prepareSynchronizeOrderQueueName;
}
public String getContrabandCheckQueueName() {
return contrabandCheckQueueName;
}
public void setContrabandCheckQueueName(String contrabandCheckQueueName) {
this.contrabandCheckQueueName = contrabandCheckQueueName;
}
public String getInBoundConditionCheckQueueName() {
return inBoundConditionCheckQueueName;
}
public String getPcsPackageMarkElectricQueueName(){
return pcsPackageMarkElectricQueueName;
}
public String getNoprealertRecognitionNotificationQueueName() {
return noprealertRecognitionNotificationQueueName;
}
public String getJobOrderRecoverMergeQueueName(){
return jobOrderRecoverMergeQueueName;
}
public String getRejectedPackageToProcessNotifyQueueName(){
return rejectedPackageToProcessNotifyQueueName;
}
public void setNoprealertRecognitionNotificationQueueName(String noprealertRecognitionNotificationQueueName) {
this.noprealertRecognitionNotificationQueueName = noprealertRecognitionNotificationQueueName;
}
public String getPackageRelateOrderQueueName() {
return packageRelateOrderQueueName;
}
public String getPcsNoprealertPutawayQueueName() {
return pcsNoprealertPutawayQueueName;
}
public String getOutVolumeReleaseContainerQueueName() {
return outVolumeReleaseContainerQueueName;
}
public String getGetFestFailNoticeQueueName() {
return getFestFailNoticeQueueName;
}
public String getModifyOfficialTmallWeightQueueName() {
return modifyOfficialTmallWeightQueueName;
}
public String getSortingCenterOrderInfoQueueName() {
return sortingCenterOrderInfoQueueName;
}
public String getSortingCenterCallBackQueueName() {
return sortingCenterCallBackQueueName;
}
public String getJobOrderSendDelegationCodeUpateStatusQueueName() {
return jobOrderSendDelegationCodeUpateStatusQueueName;
}
public String getSendATGInOutToXMSQueueName() {
return sendATGInOutToXMSQueueName;
}
public String getUpdateJobPackageSizeInfoQueueName() {
return updateJobPackageSizeInfoQueueName;
}
public String getOrderPrintMessageSyncPackageQueueName() {
return orderPrintMessageSyncPackageQueueName;
}
public String getPackageStatusChangeMessageQueueName() {
return packageStatusChangeMessageQueueName;
}
}
spring boot 之Rabbitmq 基本配置的更多相关文章
- spring boot整合RabbitMQ(Direct模式)
springboot集成RabbitMQ非常简单,如果只是简单的使用配置非常少,springboot提供了spring-boot-starter-amqp项目对消息各种支持. Direct Excha ...
- Spring Boot整合Rabbitmq
Spring Boot应用中整合RabbitMQ,并实现一个简单的发送.接收消息的例子来对RabbitMQ有一个直观的感受和理解. 在Spring Boot中整合RabbitMQ是一件非常容易的事,因 ...
- 85. Spring Boot集成RabbitMQ【从零开始学Spring Boot】
这一节我们介绍下Spring Boot整合RabbitMQ,对于RabbitMQ这里不过多的介绍,大家可以参考网络上的资源进行安装配置,本节重点是告诉大家如何在Spring Boot中使用Rabbit ...
- Spring Boot (十三): Spring Boot 整合 RabbitMQ
1. 前言 RabbitMQ 是一个消息队列,说到消息队列,大家可能多多少少有听过,它主要的功能是用来实现应用服务的异步与解耦,同时也能起到削峰填谷.消息分发的作用. 消息队列在比较主要的一个作用是用 ...
- Spring Boot 集成 RabbitMQ 实战
Spring Boot 集成 RabbitMQ 实战 特别说明: 本文主要参考了程序员 DD 的博客文章<Spring Boot中使用RabbitMQ>,在此向原作者表示感谢. Mac 上 ...
- 学记:为spring boot写一个自动配置
spring boot遵循"约定优于配置"的原则,使用annotation对一些常规的配置项做默认配置,减少或不使用xml配置,让你的项目快速运行起来.spring boot的神奇 ...
- Spring Boot 探索系列 - 自动化配置篇
26. Logging Prev Part IV. Spring Boot features Next 26. Logging Spring Boot uses Commons Logging f ...
- Spring Boot 2.0 教程 | 配置 Undertow 容器
欢迎关注个人微信公众号: 小哈学Java, 文末分享阿里 P8 资深架构师吐血总结的 <Java 核心知识整理&面试.pdf>资源链接!! 文章首发于个人网站 https://ww ...
- Spring Boot之实现自动配置
GITHUB地址:https://github.com/zhangboqing/springboot-learning 一.Spring Boot自动配置原理 自动配置功能是由@SpringBootA ...
随机推荐
- 原!linux 监控 jar定时任务 挂了重启 脚本
#!/bin/bash time=$(date "+%Y-%m-%d %H:%M:%S") echo "monitor start at: ${time}" P ...
- java 多线程 day13 condition 线程通信
/** * Created by chengtao on 17/12/5. * Condition 类似 wait和notify,解决线程间的同步问题 */ import java.util.conc ...
- Spark应用日志级别设置
一. 日志效率原因 开发时,控制台输出一大堆日志信息,严重影响查看日志效率. 从控制台输出日志我们可以看出,应用程序是默认加载Spark-core包下面的log4j-defaults.proper ...
- Linux下多个.c文件的编译和Makefile文件
在编程的时候,我们可以把一个完整程序的每个函数分离出来,写成.c文件,最后再一起编译和链接.这样有利于程序功能模块化,也方便检查代码错误. .h文件:里面编辑该程序需要引用的头文件. #ifndef ...
- android 读取联系人
设置读取权限 <uses-permission android:name="android.permission.READ_CONTACTS" /> <u ...
- Linux系统——shell脚本
shell脚本编程 作用:通过命令行解析的方式,自动执行设定好的程序或命令代码.(若将脚本挂到定时任务中,就会自动在非工作时间里自动触发执行程序) Shell脚本文件以“.sh”结尾 规范的Shell ...
- PKU 2506 Tiling(递推+高精度||string应用)
题目大意:原题链接有2×1和2×2两种规格的地板,现要拼2×n的形状,共有多少种情况,首先要做这道题目要先对递推有一定的了解.解题思路:1.假设我们已经铺好了2×(n-1)的情形,则要铺到2×n则只能 ...
- ionic 配置打包环境
配置java环境就不说了,太简单 下载AndroidSdkAndroid SDK Tools翻过墙的朋友可以去Google Android的官网上下载:http://developer.android ...
- Java并发编程:并发容器之ConcurrentHashMap(转)
本文转自:http://www.cnblogs.com/dolphin0520/p/3932905.html Java并发编程:并发容器之ConcurrentHashMap(转载) 下面这部分内容转载 ...
- oracle中修改表已有数据的某一列的字段类型的方法,数据备份
1.在开发过程中经常会遇到表中的某一个字段数据类型不对,比如说需要保存的数据带小数,但是在最初设计的时候是给的number(10)类型,开始保存是整数的时候满足要求,后来在保存小数的时候 会发现自动四 ...