From f3948fa31158c7b7dea3b038e01c43ce54c55a1c Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 14 Apr 2021 11:09:57 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 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 6d6c947..216bcca 100644 --- a/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java +++ b/src/main/java/com/xcong/excoin/configurations/RabbitMqConfig.java @@ -76,6 +76,18 @@ // 全仓爆仓 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"; @@ -102,6 +114,9 @@ // 全仓爆仓 public static final String ROUTINGKEY_WHOLE_BOMB = "ROUTINGKEY_WHOLE_BOMB"; + + // 全仓价格操作 + public static final String ROUTINGKEY_WHOLE_PRICE = "ROUTINGKEY_WHOLE_PRICE"; @Resource private ConnectionFactory connectionFactory; @@ -276,6 +291,10 @@ return new Queue(QUEUE_CLOSETRADE, true); } + @Bean + public Queue queueWholePrice() { + return new Queue(QUEUE_WHOLE_PRICE, true); + } /** * 全仓爆仓 * @return @@ -285,6 +304,32 @@ 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); + } + /** * 开多止盈 * -- Gitblit v1.9.1