Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

丁松杰 / Pole

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • Pole
  • src
  • Pole.ReliableMessage.Masstransit
  • MasstransitRabbitmqOption.cs
Find file
BlameHistoryPermalink
  • dingsongjie's avatar
    优化 重试机制 · 672f72c7
    dingsongjie committed 5 years ago
    672f72c7
MasstransitRabbitmqOption.cs 1.01 KB
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
using GreenPipes;
using GreenPipes.Configurators;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;

namespace Pole.ReliableMessage.Masstransit
{
    public class MasstransitRabbitmqOption
    {
        public string RabbitMqHostAddress { get; set; }
        public string RabbitMqHostUserName { get; set; }
        public string RabbitMqHostPassword { get; set; }
        public string QueueNamePrefix { get; set; } = string.Empty;

        public string EventHandlerNameSuffix = "EventHandler";
        /// <summary>
        /// 2 个并发
        /// </summary>
        public ushort PrefetchCount { get; set; } = 2;

        public Action<IRetryConfigurator> RetryConfigure { get; set; } =
        r => r.Intervals(TimeSpan.FromSeconds(0.1)
                     , TimeSpan.FromSeconds(1)
                     , TimeSpan.FromSeconds(4)
                     , TimeSpan.FromSeconds(16)
                     , TimeSpan.FromSeconds(64)
                     );
    }
}