From 6c4ca033bf15f7bb6fa01f15e06212ad5ba0868d Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sat, 15 May 2021 17:59:26 +0800
Subject: [PATCH] Merge branch 'yunding' of http://120.27.238.55:7000/r/exchange into yunding
---
src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 153 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java b/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
index da218eb..ed5c83b 100644
--- a/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
+++ b/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java
@@ -30,6 +30,32 @@
public static final String EXCHANGE_A = "biue-exchange-A";
+ public static final String EXCHANGE_USDT_UPDATE = "exchange_usdt_update";
+
+ public static final String QUEUE_USDT_UPDATE = "queue_usdt_update";
+
+ public static final String ROUTING_KEY_USDT_UPDATE = "routing_key_usdt_update";
+
+ public static final String EXCHANGE_USDT_ADDRESS = "exchange_usdt_address";
+
+ public static final String QUEUE_USDT_ADDRESS= "queue_usdt_address";
+
+ public static final String ROUTING_KEY_USDT_ADDRESS = "routing_key_usdt_address";
+
+ public static final String QUEUE_XCH_USDT_PRIFIT = "QUEUE_XCH_USDT_PRIFIT";
+ public static final String ROUTING_KEE_XCH_USDT_PRIFIT = "ROUTING_KEE_XCH_USDT_PRIFIT";
+ public static final String EXCHANGE_XCH = "EXCHANGE_XCH";
+
+ public static final String QUEUE_XCH_AUTO_AGENT = "QUEUE_XCH_AUTO_AGENT";
+ public static final String ROUTING_KEY_XCH_AUTO_AGENT = "ROUTING_KEY_XCH_AUTO_AGENT";
+
+
+ /**
+ * 撮合交易
+ */
+ public static final String EXCHANGE_B = "biue-exchange-B";
+
+
// 开多止盈队列
public static final String QUEUE_MOREPRO = "QUEUE_MOREPRO_NEW";
// 开空止盈队列
@@ -54,6 +80,21 @@
// 平仓队列
public static final String QUEUE_CLOSETRADE = "QUEUE_CLOSETRADE_NEW";
+ // 全仓爆仓
+ public static final String QUEUE_WHOLE_BOMB = "QUEUE_WHOLE_BOMB_NEW";
+
+ // 全仓价格操作
+ public static final String QUEUE_WHOLE_PRICE = "QUEUE_WHOLE_PRCE";
+
+ // 跟单下单
+ public static final String QUEUE_FOLLOW_ORDER = "QUEUE_FOLLOW_ORDER";
+
+ public static final String ROUTINGKEY_FOLLOW_ORDER = "ROUTINGKEY_FOLLOW_ORDER";
+
+ // 跟单调整保证金
+ public static final String QUEUE_FOLLOW_CHANGE_BOND = "QUEUE_FOLLOW_CHANGE_BOND";
+
+ public static final String ROUTINGKEY_FOLLOW_CHANGE_BOND = "ROUTINGKEY_FOLLOW_CHANGE_BOND";
// 开多止盈路由键
public static final String ROUTINGKEY_MOREPRO = "ROUTINGKEY_MOREPRO";
@@ -77,6 +118,12 @@
// 委托平仓
public static final String ROUTINGKEY_LIMIT_CLOSE = "ROUTINGKEY_LIMIT_CLOSE";
+
+ // 全仓爆仓
+ public static final String ROUTINGKEY_WHOLE_BOMB = "ROUTINGKEY_WHOLE_BOMB";
+
+ // 全仓价格操作
+ public static final String ROUTINGKEY_WHOLE_PRICE = "ROUTINGKEY_WHOLE_PRICE";
@Resource
private ConnectionFactory connectionFactory;
@@ -102,6 +149,31 @@
}
@Bean
+ public DirectExchange xchExchange() {
+ return new DirectExchange(EXCHANGE_XCH);
+ }
+
+ @Bean
+ public Queue xchUsdtProfitQueue() {
+ return new Queue(QUEUE_XCH_USDT_PRIFIT, true);
+ }
+
+ @Bean
+ public Binding xchUsdtProfitBinding() {
+ return BindingBuilder.bind(xchUsdtProfitQueue()).to(xchExchange()).with(ROUTING_KEE_XCH_USDT_PRIFIT);
+ }
+
+ @Bean
+ public Queue xchAutoAgentQueue() {
+ return new Queue(QUEUE_XCH_AUTO_AGENT, true);
+ }
+
+ @Bean
+ public Binding xchAutoAgentBinding() {
+ return BindingBuilder.bind(xchAutoAgentQueue()).to(xchExchange()).with(ROUTING_KEY_XCH_AUTO_AGENT);
+ }
+
+ @Bean
public Queue testQueue() {
return new Queue(QUEUE_TEST, true);
}
@@ -109,6 +181,39 @@
@Bean
public Binding binding() {
return BindingBuilder.bind(testQueue()).to(defaultExchange()).with(ROUTING_KEY_TEST);
+ }
+
+
+ @Bean
+ public DirectExchange usdtUpdateExchange() {
+ return new DirectExchange(EXCHANGE_USDT_UPDATE);
+ }
+
+
+ @Bean
+ public Queue usdtUpdateQueue() {
+ return new Queue(QUEUE_USDT_UPDATE, true);
+ }
+
+ @Bean
+ public Binding usdtUpdatebinding() {
+ return BindingBuilder.bind(usdtUpdateQueue()).to(usdtUpdateExchange()).with(ROUTING_KEY_USDT_UPDATE);
+ }
+
+ @Bean
+ public DirectExchange usdtAddressExchange() {
+ return new DirectExchange(EXCHANGE_USDT_ADDRESS);
+ }
+
+
+ @Bean
+ public Queue usdtAddressQueue() {
+ return new Queue(QUEUE_USDT_ADDRESS, true);
+ }
+
+ @Bean
+ public Binding usdtAddressbinding() {
+ return BindingBuilder.bind(usdtAddressQueue()).to(usdtAddressExchange()).with(ROUTING_KEY_USDT_ADDRESS);
}
@@ -218,6 +323,44 @@
return new Queue(QUEUE_CLOSETRADE, true);
}
+ @Bean
+ public Queue queueWholePrice() {
+ return new Queue(QUEUE_WHOLE_PRICE, true);
+ }
+ /**
+ * 全仓爆仓
+ * @return
+ */
+ @Bean
+ public Queue queueWholeBomb() {
+ return new Queue(QUEUE_WHOLE_BOMB, true);
+ }
+
+ @Bean
+ public Queue queueFollowOrder() {
+ return new Queue(QUEUE_FOLLOW_ORDER, true);
+ }
+
+ @Bean
+ public Queue queueFollowChangeBond() {
+ return new Queue(QUEUE_FOLLOW_CHANGE_BOND, true);
+ }
+
+ @Bean
+ public Binding bindingFollowChangeBond() {
+ return BindingBuilder.bind(queueFollowChangeBond()).to(orderExchange()).with(ROUTINGKEY_FOLLOW_CHANGE_BOND);
+ }
+
+ @Bean
+ public Binding bindingFollowOrder() {
+ return BindingBuilder.bind(queueFollowOrder()).to(orderExchange()).with(RabbitMqConfig.ROUTINGKEY_FOLLOW_ORDER);
+ }
+
+
+ @Bean
+ public Binding bindingWholePrice() {
+ return BindingBuilder.bind(queueWholePrice()).to(orderExchange()).with(RabbitMqConfig.ROUTINGKEY_WHOLE_PRICE);
+ }
/**
* 开多止盈
@@ -311,4 +454,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