{"action":"created","issue":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/555","repository_url":"https://api.github.com/repos/rebus-org/Rebus","labels_url":"https://api.github.com/repos/rebus-org/Rebus/issues/555/labels{/name}","comments_url":"https://api.github.com/repos/rebus-org/Rebus/issues/555/comments","events_url":"https://api.github.com/repos/rebus-org/Rebus/issues/555/events","html_url":"https://github.com/rebus-org/Rebus/issues/555","id":187940455,"number":555,"title":"Why disabling timeouts in SqlServer?","user":{"login":"JornWildt","id":274072,"avatar_url":"https://avatars.githubusercontent.com/u/274072?v=3","gravatar_id":"","url":"https://api.github.com/users/JornWildt","html_url":"https://github.com/JornWildt","followers_url":"https://api.github.com/users/JornWildt/followers","following_url":"https://api.github.com/users/JornWildt/following{/other_user}","gists_url":"https://api.github.com/users/JornWildt/gists{/gist_id}","starred_url":"https://api.github.com/users/JornWildt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JornWildt/subscriptions","organizations_url":"https://api.github.com/users/JornWildt/orgs","repos_url":"https://api.github.com/users/JornWildt/repos","events_url":"https://api.github.com/users/JornWildt/events{/privacy}","received_events_url":"https://api.github.com/users/JornWildt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-08T09:24:46Z","updated_at":"2016-11-08T10:10:33Z","closed_at":null,"body":"In Rebus.SqlServer we have the following piece of extension code:\r\n\r\n    static void Configure(StandardConfigurer<ITransport> configurer, Func<IRebusLoggerFactory, IDbConnectionProvider> connectionProviderFactory, string tableName, string inputQueueName)\r\n    {\r\n        configurer.Register(context =>\r\n        {\r\n            var rebusLoggerFactory = context.Get<IRebusLoggerFactory>();\r\n            var asyncTaskFactory = context.Get<IAsyncTaskFactory>();\r\n            var connectionProvider = connectionProviderFactory(rebusLoggerFactory);\r\n            var transport = new SqlServerTransport(connectionProvider, tableName, inputQueueName, rebusLoggerFactory, asyncTaskFactory);\r\n            transport.EnsureTableIsCreated();\r\n            return transport;\r\n        });\r\n\r\n        configurer.OtherService<ITimeoutManager>().Register(c => new DisabledTimeoutManager());\r\n\r\n        configurer.OtherService<IPipeline>().Decorate(c =>\r\n        {\r\n            var pipeline = c.Get<IPipeline>();\r\n\r\n            return new PipelineStepRemover(pipeline)\r\n                .RemoveIncomingStep(s => s.GetType() == typeof(HandleDeferredMessagesStep));\r\n        });\r\n    }\r\n\r\nWhy is `DisabledTimeoutManager` used here? It makes it impossible to use an external timeout manager (or any other timeout manager?). When I do the following it fails with \"Attempted to register primary -> Rebus.Timeouts.ITimeoutManager, but a primary registration already exists: primary -> Rebus.Timeouts.ITimeoutManager\":\r\n\r\n    busConfigurer\r\n      .Transport(t => t.UseSqlServer(dbConnectionString, RebusMessagesTableName, rebusConfig.inputQueue))\r\n      .Sagas(s => s.StoreInSqlServer(dbConnectionString, RebusSagasTableName, RebusSagaIndexTableName))\r\n      .Timeouts(t => t.UseExternalTimeoutManager(\"timeoutmanager\"));\r\n\r\nIt does not matter whether .Transport or .Timeouts come first."},"comment":{"url":"https://api.github.com/repos/rebus-org/Rebus/issues/comments/259096944","html_url":"https://github.com/rebus-org/Rebus/issues/555#issuecomment-259096944","issue_url":"https://api.github.com/repos/rebus-org/Rebus/issues/555","id":259096944,"user":{"login":"mookid8000","id":32968,"avatar_url":"https://avatars.githubusercontent.com/u/32968?v=3","gravatar_id":"","url":"https://api.github.com/users/mookid8000","html_url":"https://github.com/mookid8000","followers_url":"https://api.github.com/users/mookid8000/followers","following_url":"https://api.github.com/users/mookid8000/following{/other_user}","gists_url":"https://api.github.com/users/mookid8000/gists{/gist_id}","starred_url":"https://api.github.com/users/mookid8000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mookid8000/subscriptions","organizations_url":"https://api.github.com/users/mookid8000/orgs","repos_url":"https://api.github.com/users/mookid8000/repos","events_url":"https://api.github.com/users/mookid8000/events{/privacy}","received_events_url":"https://api.github.com/users/mookid8000/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T10:10:33Z","updated_at":"2016-11-08T10:10:33Z","body":"Well.... it's because the SQL transport has built-in message deferral, i.e. it does not actually need a timeout manager.\r\n\r\nIf you look at the messages table, each row is stored with a timestamp of when that particular message is to become visible, which in turn is used by the transport when querying for new messages."}}
{"actor":{"display_login":"mookid8000"}}