Skip to content

Commit

Permalink
DomainEvent Retry.
Browse files Browse the repository at this point in the history
  • Loading branch information
8treenet committed Apr 24, 2021
1 parent 0602c27 commit 16fa742
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
18 changes: 8 additions & 10 deletions example/fshop/infra/domainevent/event_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ import (

func newEventRetry() *eventRetry {
return &eventRetry{
pubPool: make(map[string]reflect.Type),
subPool: make(map[string]subRetry),
delay: 60 * time.Second, //新插入数据,延迟60秒被扫描
retries: 3, //重试次数
interval: time.Second * 30, //定时间隔
pubPool: make(map[string]reflect.Type),
subPool: make(map[string]subRetry),
delay: 60 * time.Second, //新插入数据,延迟60秒被扫描
retries: 3, //重试次数
}
}

type eventRetry struct {
pubPool map[string]reflect.Type
subPool map[string]subRetry
delay time.Duration
retries int
interval time.Duration
pubPool map[string]reflect.Type
subPool map[string]subRetry
delay time.Duration
retries int
}

type subRetry struct {
Expand Down
18 changes: 8 additions & 10 deletions example/infra-example/infra/domainevent/event_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@ import (

func newEventRetry() *eventRetry {
return &eventRetry{
pubPool: make(map[string]reflect.Type),
subPool: make(map[string]subRetry),
delay: 60 * time.Second, //新插入数据,延迟60秒被扫描
retries: 3, //重试次数
interval: time.Second * 30, //定时间隔
pubPool: make(map[string]reflect.Type),
subPool: make(map[string]subRetry),
delay: 60 * time.Second, //新插入数据,延迟60秒被扫描
retries: 3, //重试次数
}
}

type eventRetry struct {
pubPool map[string]reflect.Type
subPool map[string]subRetry
delay time.Duration
retries int
interval time.Duration
pubPool map[string]reflect.Type
subPool map[string]subRetry
delay time.Duration
retries int
}

type subRetry struct {
Expand Down

0 comments on commit 16fa742

Please sign in to comment.