From fa91cc62d16b55c99d4cf6451ac6e2f1e0031dd5 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Sat, 15 May 2021 18:35:15 +0800 Subject: [PATCH] 20210515 云顶 --- src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java | 61 ++++++++++++++++++++++++++++++ 1 files changed, 61 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 b8a2da2..ed5c83b 100644 --- a/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java +++ b/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java @@ -42,6 +42,13 @@ 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"; + /** * 撮合交易 @@ -79,6 +86,15 @@ // 全仓价格操作 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"; @@ -130,6 +146,31 @@ @Bean public DirectExchange defaultExchange() { return new DirectExchange(EXCHANGE_ONE); + } + + @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 @@ -295,6 +336,26 @@ 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() { -- Gitblit v1.9.1