-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcfg.go
31 lines (27 loc) · 825 Bytes
/
cfg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package rmq
import (
"time"
)
type (
// ConnectionCfg - main connection config, is not used, because reconnect doesnt supported
ConnectionCfg struct {
// ReconnectTimeout - period, when process try to establish connection again.
ReconnectTimeout time.Duration
}
// ConsumerConfig - main consumer config
ConsumerConfig struct {
// number of consuming workers
WorkersCount int
// run message handling in a single goroutine or in worker loop
Synchronous bool
}
// PublisherConfig - main publisher config
PublisherConfig struct {
// MaxChannelsCount max channels count
MaxChannelsCount int32
// CleanUp interval - task for closing idle channels in pool
CleanUpInterval time.Duration
// Max idle time per one channel. Set this param smaller than CleanUpInterval
MaxIdleTime time.Duration
}
)