mark for doc
This commit is contained in:
parent
8369dad0b7
commit
15fbe0f14a
@ -40,24 +40,26 @@ public class ConfigOf00B {
|
||||
public Queue MES_REQUEST_QUEUE_00B(){
|
||||
Queue queue = new Queue(MES_REQUEST_QUEUE_00B);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
}
|
||||
@Bean
|
||||
public Queue MES_RESPONSE_QUEUE_00B(){
|
||||
Queue queue = new Queue(MES_RESPONSE_QUEUE_00B);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public Queue EAP_REQUEST_QUEUE_00B(){
|
||||
Queue queue = new Queue(EAP_REQUEST_QUEUE_00B);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
|
||||
}
|
||||
@ -65,8 +67,8 @@ public class ConfigOf00B {
|
||||
public Queue EAP_RESPONSE_QUEUE_00B(){
|
||||
Queue queue = new Queue(EAP_RESPONSE_QUEUE_00B);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
}
|
||||
|
||||
|
@ -41,8 +41,8 @@ public class ConfigOf00C {
|
||||
public Queue MES_REQUEST_QUEUE_00C(){
|
||||
Queue queue = new Queue(MES_REQUEST_QUEUE_00C);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
}
|
||||
|
||||
@ -50,16 +50,16 @@ public class ConfigOf00C {
|
||||
public Queue MES_RESPONSE_QUEUE_00C(){
|
||||
Queue queue = new Queue(MES_RESPONSE_QUEUE_00C);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
}
|
||||
@Bean
|
||||
public Queue EAP_REQUEST_QUEUE_00C(){
|
||||
Queue queue = new Queue(EAP_REQUEST_QUEUE_00C);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
|
||||
}
|
||||
@ -67,8 +67,8 @@ public class ConfigOf00C {
|
||||
public Queue EAP_RESPONSE_QUEUE_00C(){
|
||||
Queue queue = new Queue(EAP_RESPONSE_QUEUE_00C);
|
||||
queue.addArgument("x-dead-letter-exchange",ConfigOfDeadLetterQueue.EXCHANGE_NAME_DLE);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
queue.addArgument("x-dead-letter-routing-key",ConfigOfDeadLetterQueue.Dead_Letter_RoutingKey);
|
||||
//queue.addArgument("x-max-priority",ConfigOfDeadLetterQueue.MAX_PRIORITY);
|
||||
return queue;
|
||||
}
|
||||
|
||||
|
@ -27,13 +27,13 @@ public class ConfigOfDeadLetterQueue {
|
||||
* 所以 MES-Received 处理异常的 Message 都会被 投递到 Dead_Letter_Exchange => Dead_Letter_Queue(这个队列)
|
||||
*/
|
||||
public static final String EXCHANGE_NAME_DLE = "Dead_Letter_Exchange";
|
||||
public static final String EAP_REQUEST_QUEUE_DLE = "Dead_Letter_Queue";
|
||||
public static final String EAP_REQUEST_QUEUE_ROUTINGKEY_DLE = "DL_For_MESReceived_Rk";
|
||||
public static final String Dead_Letter_Queue = "Dead_Letter_Queue";
|
||||
public static final String Dead_Letter_RoutingKey = "Dead_Letter_RoutingKey";
|
||||
public static final Integer MAX_PRIORITY = 10;
|
||||
|
||||
@Bean
|
||||
public Queue EAP_REQUEST_QUEUE_DLE(){
|
||||
Queue queue = new Queue(EAP_REQUEST_QUEUE_DLE);
|
||||
Queue queue = new Queue(Dead_Letter_Queue);
|
||||
queue.setIgnoreDeclarationExceptions(true);
|
||||
|
||||
return queue;
|
||||
@ -47,6 +47,6 @@ public class ConfigOfDeadLetterQueue {
|
||||
@Bean
|
||||
public Binding EAP_REQUEST_QUEUE_ROUTINGKEY_DLE(){
|
||||
return BindingBuilder.bind(EAP_REQUEST_QUEUE_DLE()).to(EXCHANGE_NAME_DLE())
|
||||
.with(EAP_REQUEST_QUEUE_ROUTINGKEY_DLE);
|
||||
.with(Dead_Letter_RoutingKey);
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ public class DeadLetterQueueReceived {
|
||||
// )
|
||||
|
||||
|
||||
@RabbitListener(queues = ConfigOfDeadLetterQueue.EAP_REQUEST_QUEUE_DLE)
|
||||
@RabbitListener(queues = ConfigOfDeadLetterQueue.Dead_Letter_Queue)
|
||||
@RabbitHandler
|
||||
public void dlForPID00B(Message<?> message, Channel channel)throws Exception{
|
||||
public void deadLetterQueue(Message<?> message, Channel channel)throws Exception{
|
||||
|
||||
System.out.println("线程名"+Thread.currentThread().hashCode()+"==============Dead_Letter_Exchange=================,"+",attr2"+message.getHeaders().get("attr2"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user