package Ġcom . tencent . devops . store . configuration Ċ Ċ import Ġcom . tencent . devops . common . event . dispatcher . pipeline . mq . MQ Ċ import Ġcom . tencent . devops . common . event . dispatcher . pipeline . mq . MQ EventDispatcher Ċ import Ġcom . tencent . devops . common . event . dispatcher . pipeline . mq . Tools Ċ import Ġcom . tencent . devops . store . listener . Store Pipeline Build Finish Listener Ċ import Ġorg . springframework . amqp . core . Binding Ċ import Ġorg . springframework . amqp . core . Binding Builder Ċ import Ġorg . springframework . amqp . core . Fan out Exchange Ċ import Ġorg . springframework . amqp . core . Queue Ċ import Ġorg . springframework . amqp . rabbit . connection . ConnectionFactory Ċ import Ġorg . springframework . amqp . rabbit . core . Rabbit Admin Ċ import Ġorg . springframework . amqp . rabbit . core . Rabbit Template Ċ import Ġorg . springframework . amqp . rabbit . listener . Simple Message Listener Container Ċ import Ġorg . springframework . amqp . support . converter . Jack son 2 Json Message Converter Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . beans . factory . annotation . Value Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ Ċ /** Ċ Ġ* Ġæµ ģ æ°´ çº¿ æŀĦå»º æī©å±ķ éħįç½® Ċ Ġ*/ Ċ @ Configuration Ċ class ĠStore MQ Configuration Ġ{ ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġrabbit Admin ( connection Factory : ĠConnection Factory ): ĠRabbit Admin Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠRabbit Admin ( connection Factory ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Value ("\ ${ queue Concurrency . market : 3 }") ĊĠĠĠ Ġprivate Ġval Ġmarket Concurrency : ĠInt ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġpipeline Build Atom Market Queue () Ġ= ĠQueue ( MQ . QUEUE _ PIPELINE _ BUILD _ FIN ISH _ ATOM _ MARK ET ) ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* Ġ æŀĦå»º ç»ĵæĿŁ å¹¿ æĴŃ äº¤ æį¢ æľº ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġpipeline Build Finish Fan out Exchange (): ĠF an out Exchange Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfan out Exchange Ġ= ĠF an out Exchange ( MQ . EX CHANGE _ PIPELINE _ BUILD _ FIN ISH _ F AN OUT , Ġtrue , Ġfalse ) ĊĠĠĠĠĠĠĠ Ġfan out Exchange . is Delayed Ġ= Ġtrue ĊĠĠĠĠĠĠĠ Ġreturn Ġfan out Exchange ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġpipeline Build Atom Market Queue Bind ( ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġpipeline Build Atom Market Queue : ĠQueue , ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġpipeline Build Finish Fan out Exchange : ĠF an out Exchange ĊĠĠĠ Ġ): ĠBinding Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠBinding Builder . bind ( pipeline Build Atom Market Queue ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. to ( pipeline Build Finish Fan out Exchange ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġpipeline EventDispatcher ( rabbit Template : ĠRabbit Template ) Ġ= ĠMQ EventDispatcher ( rabbit Template ) ĊĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġpipeline Build Store Listener Container ( ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġconnection Factory : ĠConnection Factory , ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġpipeline Build Atom Market Queue : ĠQueue , ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġrabbit Admin : ĠRabbit Admin , ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġlistener : ĠStore Pipeline Build Finish Listener , ĊĠĠĠĠĠĠĠ Ġ@ Autowired Ġmessage Converter : ĠJack son 2 Json Message Converter ĊĠĠĠ Ġ): ĠSimple Message Listener Container Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠTools . create Simple Message Listener Container ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconnection Factory Ġ= Ġconnection Factory , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġqueue Ġ= Ġpipeline Build Atom Market Queue , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrabbit Admin Ġ= Ġrabbit Admin , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbuild Listener Ġ= Ġlistener , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmessage Converter Ġ= Ġmessage Converter , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstart Consumer Min Interval Ġ= Ġ 1 2 0 0 0 0 , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconsecutive Active Trigger Ġ= Ġ 1 0 , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconcurrency Ġ= Ġmarket Concurrency !! , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmax Concurrency Ġ= Ġ 1 0 ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ }