From 3b51e28456fc8c3ca03a27df70645b82c1a1530b Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 08 Sep 2020 18:00:30 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java |   86 +++++++++++++++++++++++++++++++++++++------
 1 files changed, 74 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java b/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
index 29cae2e..bc850b9 100644
--- a/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
+++ b/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
@@ -21,36 +21,41 @@
 @Configuration
 public class RabbitMqConfig {
 
-    public static final String EXCHANGE_ONE = "excoin-exchange-one";
+    public static final String EXCHANGE_ONE = "biue-exchange-one";
 
     public static final String QUEUE_TEST = "test-queue";
 
     public static final String ROUTING_KEY_TEST = "test-routingKey";
 
-    public static final String EXCHANGE_A = "biyi-exchange-A";
+    public static final String EXCHANGE_A = "biue-exchange-A";
 
 
     // 开多止盈队列
-    public static final String QUEUE_MOREPRO = "QUEUE_MOREPRO";
+    public static final String QUEUE_MOREPRO = "QUEUE_MOREPRO_NEW";
     // 开空止盈队列
-    public static final String QUEUE_LESSPRO = "QUEUE_LESSPRO";
+    public static final String QUEUE_LESSPRO = "QUEUE_LESSPRO_NEW";
     // 开多止损队列
-    public static final String QUEUE_MORELOSS = "QUEUE_MORELOSS";
+    public static final String QUEUE_MORELOSS = "QUEUE_MORELOSS_NEW";
     // 开空止损队列
-    public static final String QUEUE_LESSLOSS = "QUEUE_LESSLOSS";
+    public static final String QUEUE_LESSLOSS = "QUEUE_LESSLOSS_NEW";
 
     // 限价委托
-    public static final String QUEUE_LIMIT = "QUEUE_LIMIT";
+    public static final String QUEUE_LIMIT = "QUEUE_LIMIT_NEW";
+
+    // 委托平仓
+    public static final String QUEUE_LIMIT_CLOSE = "QUEUE_LIMIT_CLOSE_NEW";
 
     // 爆仓队列
-    public static final String QUEUE_COINOUT = "QUEUE_COINOUT";
+    public static final String QUEUE_COINOUT = "QUEUE_COINOUT_NEW";
 
     //价格操作
-    public static final String QUEUE_PRICEOPERATE = "QUEUE_PRICEOPERATE";
+    public static final String QUEUE_PRICEOPERATE = "QUEUE_PRICEOPERATE_NEW";
 
     // 平仓队列
-    public static final String QUEUE_CLOSETRADE = "QUEUE_CLOSETRADE";
+    public static final String QUEUE_CLOSETRADE = "QUEUE_CLOSETRADE_NEW";
 
+    // 全仓爆仓
+    public static final String QUEUE_WHOLE_BOMB = "QUEUE_WHOLE_BOMB_NEW";
 
 
     // 开多止盈路由键
@@ -72,6 +77,12 @@
     public static final String ROUTINGKEY_PRICEOPERATE = "ROUTINGKEY_PRICEOPERATE";
     // 平仓路由
     public static final String ROUTINGKEY_CLOSETRADE = "ROUTINGKEY_CLOSETRADE";
+
+    // 委托平仓
+    public static final String ROUTINGKEY_LIMIT_CLOSE = "ROUTINGKEY_LIMIT_CLOSE";
+
+    // 全仓爆仓
+    public static final String ROUTINGKEY_WHOLE_BOMB = "ROUTINGKEY_WHOLE_BOMB";
 
     @Resource
     private ConnectionFactory connectionFactory;
@@ -118,9 +129,9 @@
     }
 
 
-
     /**
      * 开多止盈队列
+     *
      * @return
      */
     @Bean
@@ -131,6 +142,7 @@
 
     /**
      * 开空止盈队列
+     *
      * @return
      */
     @Bean
@@ -141,6 +153,7 @@
 
     /**
      * 开多止损
+     *
      * @return
      */
     @Bean
@@ -151,6 +164,7 @@
 
     /**
      * 开空止损
+     *
      * @return
      */
     @Bean
@@ -161,6 +175,7 @@
 
     /**
      * 限价委托
+     *
      * @return
      */
     @Bean
@@ -168,9 +183,20 @@
         return new Queue(QUEUE_LIMIT, true);
     }
 
+    /**
+     * 委托平仓
+     *
+     * @return
+     */
+    @Bean
+    public Queue queueLimitClose() {
+        return new Queue(QUEUE_LIMIT_CLOSE, true);
+    }
+
 
     /**
      * 爆仓
+     *
      * @return
      */
     @Bean
@@ -180,6 +206,7 @@
 
     /**
      * 价格操作
+     *
      * @return
      */
     @Bean
@@ -189,6 +216,7 @@
 
     /**
      * 价格操作
+     *
      * @return
      */
     @Bean
@@ -196,10 +224,18 @@
         return new Queue(QUEUE_CLOSETRADE, true);
     }
 
-
+    /**
+     * 全仓爆仓
+     * @return
+     */
+    @Bean
+    public Queue queueWholeBomb() {
+        return new Queue(QUEUE_WHOLE_BOMB, true);
+    }
 
     /**
      * 开多止盈
+     *
      * @return
      */
     @Bean
@@ -209,6 +245,7 @@
 
     /**
      * 开空止盈
+     *
      * @return
      */
     @Bean
@@ -218,6 +255,7 @@
 
     /**
      * 开多止损
+     *
      * @return
      */
     @Bean
@@ -227,6 +265,7 @@
 
     /**
      * 开空止损
+     *
      * @return
      */
     @Bean
@@ -237,6 +276,7 @@
 
     /**
      * 委托
+     *
      * @return
      */
     @Bean
@@ -244,9 +284,19 @@
         return BindingBuilder.bind(queueLimit()).to(orderExchange()).with(RabbitMqConfig.ROUTINGKEY_LIMIT);
     }
 
+    /**
+     * 委托平仓
+     *
+     * @return
+     */
+    @Bean
+    public Binding bindingLimitClose() {
+        return BindingBuilder.bind(queueLimitClose()).to(orderExchange()).with(RabbitMqConfig.ROUTINGKEY_LIMIT_CLOSE);
+    }
 
     /**
      * 爆仓
+     *
      * @return
      */
     @Bean
@@ -257,6 +307,7 @@
 
     /**
      * 价格操作
+     *
      * @return
      */
     @Bean
@@ -266,6 +317,7 @@
 
     /**
      * 平仓绑定
+     *
      * @return
      */
     @Bean
@@ -273,4 +325,14 @@
         return BindingBuilder.bind(queueCloseTrade()).to(orderExchange()).with(RabbitMqConfig.ROUTINGKEY_CLOSETRADE);
     }
 
+    /**
+     * 全仓爆仓绑定
+     *
+     * @return
+     */
+    @Bean
+    public Binding bindingWholeBomb() {
+        return BindingBuilder.bind(queueWholeBomb()).to(orderExchange()).with(RabbitMqConfig.ROUTINGKEY_WHOLE_BOMB);
+    }
+
 }

--
Gitblit v1.9.1