feat: optimizing memamq size

This commit is contained in:
withchao 2024-08-29 14:28:45 +08:00
parent fa375f2072
commit 6a2d8ef4d1
2 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ func Start(ctx context.Context, config *Config, client discovery.SvcDiscoveryReg
conversationRpcClient: rpcclient.NewConversationRpcClient(client, config.Share.RpcRegisterName.Conversation),
config: config,
webhookClient: webhook.NewWebhookClient(config.WebhooksConfig.URL),
queue: memamq.NewMemoryQueue(128, 1024*8),
queue: memamq.NewMemoryQueue(16, 1024*1024),
})
return nil
}

View File

@ -269,8 +269,8 @@ func WithUserRpcClient(userRpcClient *UserRpcClient) NotificationSenderOptions {
}
const (
notificationWorkerCount = 2
notificationBufferSize = 200
notificationWorkerCount = 16
notificationBufferSize = 1024 * 1024 * 2
)
func NewNotificationSender(conf *config.Notification, opts ...NotificationSenderOptions) *NotificationSender {