找回密码
 加入怎通
查看: 267|回复: 0

Biz-SIP业务中台案例实战(18)——调用App延迟服务(技术中台和业务中台的区别)

[复制链接]
我来看看 发表于 2023-03-17 19:14:40 | 显示全部楼层 |阅读模式
- ]2 _) {# E( k

Biz-SIP金融级业务中台(http://bizsip.bizmda.com)是一套基于领域驱动设计(DDD)架构,能快速构建金融级云原生架构的服务整合中间件,整合了在金融场景里锤炼出来的最佳实践分布式事务是分布式系统架构设计中的一个技术难点,特别是在这几年越来越火的微服务架构中,服务拆分所带来的跨服务数据一致性问题亟待解决,而在金融系统中,这个问题更是备受关注。

( r! n- X5 t" d

在Biz-SIP金融业务中台中,是利用App延迟服务,来提供对分布式事务的支持,主要场景有:1. 重试通知:通知对方系统,如果对方系统没有响应,会重新发起通知交易,直到对方给出明确的回复响应2. 向前补偿:调用第三方服务后,超时没有响应,系统会后续发起查询上笔交易状态的查询交易,如果对方系统还是没响应,会多次重试再发起交易状态查询,并根据查询交易状态来决定继续完成后续服务步骤(上笔交易终态查询结果为已成功)还是对以前服务步骤发起补偿(冲正)操作(上笔交易终态查询结果为未成功)。

; Z0 d- L& C1 }

3. 向后补偿:调用第三方服务后,超时没有响应,系统会立即发起针对此交易的补偿交易,如果对方系统还是没响应,会多次重试再发起补偿交易补偿成功后,会对以前服务步骤依次发起补偿(冲正)操作;如果补偿失败,会置交易失败,由人工介入处理。

- ^7 i2 p1 N, g4 n9 c9 B+ [8 S

调用App延迟服务案例,是通过Biz-SIP的开放API接口,调用App服务,再由App服务发起对App延迟服务的多次重试调用:

9 i- b8 f' o0 g+ t0 @2 J, q

在以上案例中,有2个App服务:/bean/sample15:正常的App服务,被开放API接口所调用,模拟在特定场景(发起重试通知、调用第三方应用后无响应)中调用App延迟服务;/bean/sample15-delay:被调用的App延迟服务,模拟和第三方应用交互的不同场景(无响应、返回错误、返回成功)。

7 W' J. n7 z, R6 |- U. p A

具体代码和配置可以查看Biz-SIP源代码中的Sample相关测试案例(https://gitee.com/szhengye/biz-sip)一、App层App服务的开发和配置首先,我们需要编写一个App服务类(Sample15AppService.java):

4 I& m: \# p/ G/ m. [

@Slf4j@ServicepublicclassSample15AppServiceimplementsAppBeanInterface{9 `8 x1 u3 I" D' e# a private BizMessageInterface bizMessageInterface 3 d3 d1 X# c" \: Z7 }. Y9 O = AppClientFactory.getDelayAppServiceClient( 9 Q- H* v/ w# l- b! c) Y2 J BizMessageInterface

4 X" x" j6 O- A; @6 m9 l

.class, "/bean/sample15-delay", : a/ ?$ Z( r: F! w a' M; V% F 0,1000, 2000, 4000, 8000, 16000);@Overridepublic JSONObject process(JSONObject message) throws BizException { ' K+ z0 d0 ^% M& Q BizMessage bizMessage =

8 V; ^: O0 M5 X- f+ Y! R

this.bizMessageInterface.call(message);- |6 P% h4 t* o3 _$ @3 w, f6 N return bizMessage.getData();% g6 S/ }# O0 J% o0 l- H- @3 c } # r& W5 J+ E w8 B9 A0 K$ [$ Z+ O }Sample15AppService类继承了AppBeanInterface接口,实现了process()方法。

) D# j' T u8 w" j% K$ r+ w, b

Sample15AppService类中申请了调用“/bean/sample15-delay”App延迟服务的调用接口bizMessageInterface,在process()方法中,通过这个接口,来调用App延迟服务。

+ t' ]( |( a" N1 V) c

接着,我们还需要编写一个App服务类作为App延迟服务(Sample15DelayAppService.java):@Slf4j1 R0 ?; {0 D* n @ServicepublicclassSample15DelayAppService

. ^% |; F* e, s! Y' l0 }8 k

implementsAppBeanInterface{5 h4 W5 Q$ g+ H @Overridepublic JSONObject process(JSONObject message)throws BizException

0 n' M, x2 W9 u0 \" ]/ T

{ 5 t; N" t) c/ f# G' _ log.info("延迟App服务调用第[{}]次: \n{}",$ W+ \7 D/ p6 x( N* C7 \ BizUtils.getDelayRetryCount(), 0 p2 Q( d: r B' S! [ BizUtils.buildJsonLog(message)); 0 H; A2 X* G4 D4 d9 {5 E0 s

( S' U! g1 }: c% C9 l' v

int maxRetryCount = message.getInt("maxRetryCount"); * A( z% X7 ~0 K2 Q# l* a String result = (String) message.get("result"

' k+ k! V: Y& T. T

); # H& V$ k. m5 H O4 X) [% y if (BizUtils.getDelayRetryCount() >= maxRetryCount) { ! |( `- w5 J9 n9 H: @! e if ("success".equalsIgnoreCase(result)) { - @! ~: b8 S5 f3 p/ @0 w: b log.info(

# l: `& {+ y9 O

"返回成功!");5 {3 \7 o3 ^+ I return message;( S- C0 [6 A6 c/ y% Q }4 r2 k/ y% ]: W! O: I else { " ?7 U/ b4 H2 `- d2 ~. h3 P log.info("返回错误!"

n- b- ~) B$ F7 ^( J% G$ ` F

); 7 W# F V9 ^/ J" r x thrownew BizException(BizResultEnum.OTHER_ERROR,"Sample15DelayAppService调用错误!"); 2 x7 g( E9 P1 s2 ~7 Q }4 r( Z- `/ i6 P0 V }" g! g2 v& e6 a v( p9 C y4 H% u log.info(

: n$ U7 S- O2 F9 `7 u

"抛出延迟App服务重试异常,触发下一次调用..."); - F! M8 q0 J5 ]7 F+ P thrownew BizException(BizResultEnum.RETRY_DELAY_APP_SERVICE); 6 v1 C/ w2 M6 Q- Z( {8 _& e; F @ } " o, K ~( U2 L* L: F }

( d7 n" F) o2 Q, P9 W

Sample15AppService类同样继承了AppBeanInterface接口,实现了process()方法Sample15AppService类中,会根据传入报文中的“maxRetryCount”来决定调用次数,在没达到maxRetryCount约定的最大重试次数时,会直接抛出App服务重试异常(异常错误码为BizResultEnum.RETRY_DELAY_APP_SERVICE);传入报文中的“result”为达到最大重试次数后是返回成功(result为“success”)还是直接抛出异常(除App服务重试异常以外的其它BizException异常)。

' r s, ]5 M, H6 V- B9 }

然后,在app.yml中,需要配置这二个App服务:- app-service-id: /bean/sample15- S$ g) P5 u; P* Z) L type: app-bean-service, T* }& |# Q6 N6 g ]( W6 r, ? class-name: com.bizmda.bizsip.sample.app.service.Sample15AppService

1 C0 u$ E4 v: G2 A8 A

9 |8 N, ~' b6 f. ^9 Q / f, [# b+ E0 v; A6 ]: l/ I - app-service-id: /bean/sample15-delay! F1 u2 D, s/ \9 a type: app-bean-service + ?) u! C s& P# ]% n( L E I class-name: com.bizmda.bizsip.sample.app.service.Sample15DelayAppService

. _2 H0 V, d' y: `$ u- g& c" _) N

二、启动应用进行测试启动SampleAppApplication应用,通过OpenAPI接口进行测试首先,请求报文中设置最大重试次数(maxRetryCount)为4,最终返回结果(result)为“success”。

2 _/ C% i" Z" W) Q

$ curl -H "Content-Type:application/json" -H "Biz-Service-Id:/bean/sample15" -X POST --data{"maxRetryCount":4,"result":"success"}

2 }5 N; @; Z2 J

http://localhost:8888/api|jq' x% f3 Z: R# a: | 1 h4 c4 @9 D4 U# _2 p' w, J {- Q) K5 C+ C1 `' |7 v+ F "code": 0, + T, p9 L/ @0 p S& \" e "message": "success", 0 r% }5 {9 `; g1 O2 j8 [ "extMessage": null,6 y# W y2 d q* O& {" m; E "appServiceId"

5 P# b$ @/ ?$ W1 S4 ?

: "/bean/sample15",$ F: P* I, e! }; S- H( L9 \ "traceId": "35a40e4bace44883bcb6511a3b016b82", ; ^1 c/ W, p8 d" | "parentTraceId": null,: [: Z9 s7 |$ u "timestamp"

5 N% P5 n* Q9 G5 R

: 1648358690842, & k! k" ]5 N4 `6 V( d* j "data": {# Y9 e' @% h8 ~8 P/ y "maxRetryCount": 4, 8 b3 L1 R6 E. p4 S "result": "success" $ d y4 U2 f# V) ^ }* Y5 { c5 @, N }SampleAppApplication应用中被调用的Sample15DelayAppService类打印日志:

% I/ e9 f/ R% V, x* z

[bizsip-integrator:192.169.1.103:8888] 13:24:50 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

+ @1 N5 V% m( ^" J7 E7 J# c

#1-4] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[1]次: : J% ?2 F1 j! J4 Y3 G { % A2 X4 V3 i) D K4 J* `: [ "maxRetryCount": 4,+ F% m' T9 i- v; ~) k' L! \. c "result"

r' F7 V3 r s' x2 J, P; c

: "success"( _3 y+ D4 T% d, z2 g }. J Q8 Y8 ?8 P0 } [bizsip-integrator:192.169.1.103:8888] 13:24:50 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

! U/ T( D* v4 i2 h$ r

#1-4] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用...- w1 q& }& f% E1 H4 r [bizsip-integrator:192.169.1.103:8888] 13:24:51 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

, i* R& |: b: @4 M6 u* R5 P! m

#1-3] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[2]次:6 r" J6 q C: A" ^8 \- w, h" ~ { % G# u, O# ]. q" L "maxRetryCount": 4,, E" Z0 g5 v$ x: z& l0 B5 ? "result"

, U) {9 H( [/ F1 `; ]: ~

: "success"6 e6 @2 L7 Z$ u }5 \' K2 U, E; v S7 G3 j- q [bizsip-integrator:192.169.1.103:8888] 13:24:51 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

. o8 a" K, U& Y% B6 v# A

#1-3] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用...8 V- E) D# o; D$ T6 j [bizsip-integrator:192.169.1.103:8888] 13:24:53 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

% @+ k" D/ B9 \- [( `% K* e' f% O

#1-2] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[3]次:5 ~/ R5 {8 l$ Q5 b5 L% R6 P; N4 ] { ( c' c: p$ X9 S "maxRetryCount": 4, % O$ @3 i. W0 |' g: _ \4 W* J "result"

! }1 |7 O8 v) C# A: z

: "success"7 G+ y, b% O i1 L- @: ? }" H% z7 O! Q+ {+ x [bizsip-integrator:192.169.1.103:8888] 13:24:53 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

5 S# {8 a, [; o$ c* c- Y3 i! F

#1-2] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用...5 f p" ~( {( h6 c [bizsip-integrator:192.169.1.103:8888] 13:24:58 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

+ A L! j# K4 y1 N Q) z; } w* [3 O

#1-1] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[4]次: + Y/ I) G# o! ^& n, Z4 V O { 5 a, n8 j7 N' d5 m- T "maxRetryCount": 4, 1 I0 o9 K) k* ]# ?2 Y "result"

9 j- O" n8 S% d% @7 `9 ]4 C/ L

: "success"; ^% q C2 ~0 [! w } 5 [2 h. P8 s6 [1 N( _8 U# A' |( u( a [bizsip-integrator:192.169.1.103:8888] 13:24:58 INFO 70936 [7a36a3f4c22e40a49792931645570553] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

- ?% f% L- ]; |3 i$ ^

#1-1] c.b.b.s.a.s.Sample15DelayAppService 返回成功!可以看到Sample15DelayAppService类一共被调用了4次,最后返回成功,中间的时间间隔分别为1秒、2秒、5秒(时间精确度关系,略有误差)。

n& Q2 H2 f! }: {- T" \

其次,请求报文中设置最大重试次数(maxRetryCount)为3,最终返回结果(result)为“fail”$ curl -H "Content-Type:application/json" -H "Biz-Service-Id:/bean/sample15"

& \) N7 l( ~- B( z! E

-X POST --data{"maxRetryCount":3,"result":"fail"} http://localhost:8888/api|jq) P4 w: g, r0 D, q! Z5 G + z: Y1 F% J1 R ?6 \+ ^ {. Y& g/ R! P9 ?2 {9 D* K "code": 0, $ s y2 U$ I7 [% T0 a "message"

; g! Q# s; ~8 }0 t

: "success",) m$ I$ A9 l/ U9 S "extMessage": null, `. e$ Y8 b0 P8 g( [! H/ ?0 S3 Q "appServiceId": "/bean/sample15", ! ^( I- f" g6 s "traceId": "a60d017e00554dd6a779a478ced2c7f5"

0 m2 i0 }" n: H& O+ H$ ^, }3 U

,7 B% N- S( p6 s "parentTraceId": null,2 M2 ~$ I L) P( f3 t& C "timestamp": 1648359627667,5 p2 r4 K6 \& K9 z( S% ^& ~ "data": { 3 g' c. o+ E* S6 u( I "maxRetryCount": 3, / c8 I- F9 H& I2 F ?7 W "result"

8 C! m5 s+ k ]* N

: "fail"! y+ X0 l) m: t, B% R/ v } 1 L7 @# I6 s' d }SampleAppApplication应用中被调用的Sample15DelayAppService类打印日志:[bizsip-integrator:192.169.1.103:8888] 13:40:27 INFO 70936 [2b2564ca72d74251b3e1d7bac2a99242] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

: ~2 U+ L5 r9 M/ n- I* }1 ^3 S

#1-5] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[1]次:# B- a1 T/ @& G; j* w: f {# {6 I3 N1 b) q$ O "maxRetryCount": 3,8 q# q! G' K2 J- w "result"

) L. ^# o# j% z* W" n- T/ K/ \

: "fail" 4 ^2 M/ E& h$ z$ S% r3 T& X2 B8 L } : Q3 U" h+ p; O1 l! K- {( |2 V [bizsip-integrator:192.169.1.103:8888] 13:40:27 INFO 70936 [2b2564ca72d74251b3e1d7bac2a99242] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

- p% b+ G2 c" _7 l

#1-5] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用... 4 V0 P" B8 _) F* t; K/ H k5 E* K, C [bizsip-integrator:192.169.1.103:8888] 13:40:28 INFO 70936 [2b2564ca72d74251b3e1d7bac2a99242] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

& T0 U4 U1 ^' H! w' |# U

#1-4] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[2]次: & I1 l! r0 F1 `$ l { & K$ |+ R* Y2 J/ \ "maxRetryCount": 3, / ?5 j) @2 I C4 d9 `( i; }9 u "result"

; J9 h! B! v8 s9 g' X$ @

: "fail" 7 y! Q" R4 S. d$ V } , Y) s9 ^9 d% |! f; i* ] [bizsip-integrator:192.169.1.103:8888] 13:40:28 INFO 70936 [2b2564ca72d74251b3e1d7bac2a99242] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

+ ^+ Z- @ |) f O) a m" Q

#1-4] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用... 9 I5 G2 f6 B( _ O" v [bizsip-integrator:192.169.1.103:8888] 13:40:30 INFO 70936 [2b2564ca72d74251b3e1d7bac2a99242] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

# ?3 Y: A% c- h* k2 }

#1-3] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[3]次:/ ~" S s& T% T/ V {4 k8 H$ k- ]( \" D6 y E. Z "maxRetryCount": 3, 7 ~! r, B* F( v. ` "result"

) u8 t- h+ u% N: Y9 l

: "fail"3 u/ l( D) L! _- Z X3 x2 U O }' I" d' ]5 I% Y+ a [bizsip-integrator:192.169.1.103:8888] 13:40:30 INFO 70936 [2b2564ca72d74251b3e1d7bac2a99242] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

E/ k& t' F- N

#1-3] c.b.b.s.a.s.Sample15DelayAppService 返回错误!可以看到Sample15DelayAppService类一共被调用了3次,最后返回失败,中间的时间间隔分别为1秒、2秒。

5 J K* D7 B7 g$ t5 A

最后,请求报文中设置最大重试次数(maxRetryCount)为8,最终返回结果(result)为“success”$ curl -H "Content-Type:application/json" -H

& z* O& Y& u5 h. _/ |

"Biz-Service-Id:/bean/sample15" -X POST --data{"maxRetryCount":8,"result":"success"} http://localhost:8888/api|jq

. v" C0 H! E; m. d7 ]9 b1 G) s+ `7 U

% T; }8 \& c+ y$ g # \/ b- K5 I3 \0 D7 J/ ?" W {+ X( W% z5 t: V7 ` "code": 0, ! q% l6 A2 `+ H8 P! ~9 }" ^ "message": "success", $ _+ C2 D1 ]. q2 v& C$ l( x "extMessage": null, # K i: o! {5 B+ \$ d- J& ~% D B "appServiceId": "/bean/sample15", $ C7 n/ t- u* X. |) L

$ R' J1 e; g1 J

"traceId": "19e559c658954b35861a32369b08f5b1",* b& K7 w* r- u "parentTraceId": null,8 `# x" C1 ~+ J "timestamp": 1648359793722,7 ]) m) X! [" J( s

; |7 x E* d+ X# }& {

"data": {0 K& v9 u; T: ~ "maxRetryCount": 8,; ?; `+ F. F$ B1 Q; ^; ~ "result": "success"5 D! i k* I G& f } 7 {1 H" S- D. `) C4 _! I }SampleAppApplication应用中被调用的Sample15DelayAppService类打印日志:

1 b. O. p0 V8 J4 q/ F# m E0 w

[bizsip-integrator:192.169.1.103:8888] 13:43:13 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

& ], f, T! M7 g8 f1 J

#1-2] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[1]次: 7 _) Z) R6 K1 c/ u0 } {4 p' @& D# o8 Z- U "maxRetryCount": 8,1 N) H! V7 d! U. j* a6 A* y "result"

. Z, t1 [- s' n% B) z: p# n

: "success"# ^. K5 c3 A, _, x }7 Z$ A5 u b! x [bizsip-integrator:192.169.1.103:8888] 13:43:13 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

2 B y6 b/ W4 C5 ]% X( G

#1-2] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用... ; w5 z7 c$ `0 Q% _ [bizsip-integrator:192.169.1.103:8888] 13:43:14 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

3 D5 U7 C5 t$ l* x7 @/ L5 g2 j

#1-1] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[2]次:; r+ F0 ]' D! f, B1 e { & ^: l) z& m. T# f* L/ I "maxRetryCount": 8, ' X' w% {$ K8 ^. k# V* J "result"

, `% w0 |/ \0 k X' R

: "success" 1 S& O% @' ]7 X) {7 m9 u }! v; G ?. {: a5 O" G4 x. E% w [bizsip-integrator:192.169.1.103:8888] 13:43:14 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

# a& i, |0 S. |9 t" X. N' W! S

#1-1] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用...4 D- F& a, a$ ?$ K, m' ? [bizsip-integrator:192.169.1.103:8888] 13:43:16 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

: C" ^2 S' w0 }* h s; J5 X

#1-5] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[3]次: 2 O7 A, M, ~( e0 }( o# }% p& x {& ^. h+ N% B! V: R( e' e {5 L1 ] "maxRetryCount": 8, , k6 S/ x c7 X5 _* H5 R "result"

# p" O7 [2 T" J& X' m* E

: "success"7 o' `% o# ~2 s2 j& B F3 W" _) j } . S# H: d0 `; F [bizsip-integrator:192.169.1.103:8888] 13:43:16 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

+ S8 Q5 u5 z* L- C

#1-5] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用... 6 J3 P8 \0 t5 C6 `" p1 R! E) F P! D/ _ [bizsip-integrator:192.169.1.103:8888] 13:43:20 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

7 s0 Y( {5 N/ B1 U u

#1-4] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[4]次: 2 `1 w; k5 R8 Y" J; \& F {1 T% C! k) a! u3 T "maxRetryCount": 8, & _: p1 a6 a" D1 m v* O "result"

! C6 G& Q7 }% z! l# L' N! x" i3 n

: "success"1 k2 Y, D m' t1 N3 h; L }/ ~+ `6 I3 ]% B. u# P) A [bizsip-integrator:192.169.1.103:8888] 13:43:20 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

" L# p% J5 r T1 ~5 ?

#1-4] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用...: n0 w6 b$ K1 n* T3 x6 ~4 w u, B4 N! ? [bizsip-integrator:192.169.1.103:8888] 13:43:28 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

" L/ U$ F+ m: Z

#1-3] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[5]次: 4 ?2 B$ F/ E, X9 I% u {9 |1 k( Z2 X# S+ ?; E "maxRetryCount": 8," d, F5 y+ R. X: H& K* N "result"

0 w% t/ V1 ~; i6 R

: "success"9 e+ S3 S" o2 G2 X7 \3 X0 o; l' ~ } S3 o9 j6 S9 {% ~, _% o [bizsip-integrator:192.169.1.103:8888] 13:43:28 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

6 y9 @/ U% Z8 K# ]. H. ~" Z6 Q

#1-3] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用... % t: L( C* E: G$ N7 m. E6 D' _ [bizsip-integrator:192.169.1.103:8888] 13:43:44 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

3 C" R3 f f5 |& V, K Y O! f

#1-2] c.b.b.s.a.s.Sample15DelayAppService 延迟App服务调用第[6]次:# q9 i! O M1 F, j4 T3 ^ {! I. {& t+ i# @9 U1 Y; ? "maxRetryCount": 8,0 X3 r6 L+ r0 @+ U, v "result"

. A" T; _* @1 M- W5 g$ B1 e

: "success"/ ~; U5 s/ v; F% e/ ~ } % a" k& S$ q3 X0 ~0 G9 E8 ], P3 K [bizsip-integrator:192.169.1.103:8888] 13:43:44 INFO 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

8 h5 D, r0 G% } j

#1-2] c.b.b.s.a.s.Sample15DelayAppService 抛出延迟App服务重试异常,触发下一次调用... , h' I( L3 p$ w [bizsip-integrator:192.169.1.103:8888] 13:43:44 WARN 70936 [6040bebfe86545e5a5bdbf36e4e25376] [org.springframework.amqp.rabbit.RabbitListenerEndpointContainer

: k0 j' d2 ]9 H# {+ ^

#1-2] c.b.b.a.l.DelayAppServiceQueueListener 延迟App服务重试次数超过次数[6],服务失败!可以看到Sample15DelayAppService类一共被调用了6次,最后提示“延迟App服务重试次数超过次数[6],服务失败!”,中间的时间间隔分别为1秒、2秒、4秒、8秒、16秒。

& q& z1 z* p4 {8 b! \! Q/ M% z

Biz-SIP官方网站:http://bizsip.bizmda.comGitee:https://gitee.com/szhengye/biz-sip

- z9 E$ r: M$ G2 v% x 4 }0 x; q D1 x6 A7 F& K9 o! L% ^8 _) Y( x) j4 N 6 d: r7 _( A8 }( f' ~! D / E& H7 I- W b2 }) |! k | C

暂时无法加载帖子列表

回复

使用道具 举报

    您需要登录后才可以回帖 登录 | 加入怎通

    本版积分规则

    QQ|手机版|小黑屋|网站地图|真牛社区 ( 苏ICP备2023040716号-2 )

    GMT+8, 2026-10-1 11:36 , Processed in 0.036974 second(s), 25 queries , Gzip On.

    免责声明:本站信息来自互联网,本站不对其内容真实性负责,如有侵权等情况请联系420897364#qq.com(把#换成@)删除。

    Powered by Discuz! X3.5

    快速回复 返回顶部 返回列表