{"comment":{"created_at":"2011-10-13T13:51:33Z","body":"I got this one repeated. After that exception subscriptions does not work properly.","updated_at":"2011-10-13T13:51:33Z","url":"https://api.github.com/repos/phatboyg/MassTransit/issues/comments/2394880","id":2394880,"user":{"avatar_url":"https://secure.gravatar.com/avatar/e89f43ee2b55b48a676029747831b583?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/NikGovorov","id":129254,"login":"NikGovorov"}},"action":"created","issue":{"number":35,"created_at":"2011-09-20T17:17:40Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Occurs during services startup for those which don't have queues yet.\r\nsbc.SetCreateMissingQueues(true); \r\n\r\n```C#\r\n\r\n2011-09-20 18:21:30,050 [INFO ] MassTransit.Transports.Msmq.MulticastSubscriptionClient - Sending 0 subscriptions to msmq://my-machine/project?tx=false from msmq://my-machine/gateway?tx=false\r\n2011-09-20 18:21:30,061 [DEBUG] MassTransit.Msmq.MessageLog - SEND:FormatName:MULTICAST=235.109.116.116:7786:MassTransit.Subscriptions.Messages.AddPeerMessage, MassTransit:ba3be140-9344-4849-96f5-acda6bb4872d\\786001\r\n2011-09-20 18:21:30,322 [INFO ] MassTransit.Messages - SEND:msmq-pgm://235.109.116.116:7786/gateway_subscriptions:AddPeerMessage:\r\n2011-09-20 18:21:30,343 [DEBUG] MassTransit.Threading.ThreadPoolConsumerPool - Starting Consumer Pool for msmq://my-machine/gateway?tx=false\r\n2011-09-20 18:21:30,504 [DEBUG] MassTransit.ServiceContainer - Starting bus service: MassTransit.Diagnostics.MessageTraceBusService\r\n2011-09-20 18:21:30,523 [DEBUG] MassTransit.ServiceContainer - Starting bus service: MassTransit.Subscriptions.Coordinator.SubscriptionRouterService\r\n2011-09-20 18:21:30,572 [DEBUG] MassTransit.Transports.Msmq.MessageQueueConnection - Creating MessageQueue: FormatName:DIRECT=OS:my-machine\\private$\\project_subscriptions\r\n2011-09-20 18:21:30,591 [DEBUG] MassTransit.Msmq.MessageLog - SEND:FormatName:DIRECT=OS:my-machine\\private$\\project_subscriptions:MassTransit.Fault`1[[MassTransit.Subscriptions.Messages.AddPeer, MassTransit]], MassTransit:ba3be140-9344-4849-96f5-acda6bb4872d\\786005\r\n2011-09-20 18:21:30,599 [INFO ] MassTransit.Messages - SEND:msmq://my-machine/project_subscriptions?tx=false:Fault`1:\r\n2011-09-20 18:21:30,635 [ERROR] MassTransit.Context.ServiceBusReceiveContext - 'System.Action`1[[MassTransit.IConsumeContext, MassTransit, Version=2.0.0.5, Culture=neutral, PublicKeyToken=null]]' threw an exception consuming message 'MassTransit.Context.ReceiveContext'\r\nSystem.NullReferenceException: Object reference not set to an instance of an object.\r\n   at MassTransit.Transports.Msmq.MulticastSubscriptionClient.Consume(IConsumeContext`1 context) in c:\\OSS\\MassTransit\\git\\src\\Transports\\MassTransit.Transports.Msmq\\MulticastSubscriptionClient.cs:line 84\r\n   at MassTransit.SubscriptionConnectors.ContextInstanceSubscriptionConnector`2.<>c__DisplayClass3.<Connect>b__1(IConsumeContext`1 x) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Configuration\\SubscriptionConnectors\\ContextInstanceSubscriptionConnector.cs:line 35\r\n   at MassTransit.Pipeline.Sinks.InboundConvertMessageSink`1.<>c__DisplayClass2.<>c__DisplayClass4.<Enumerate>b__1(IConsumeContext x) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Pipeline\\Sinks\\InboundConvertMessageSink.cs:line 45\r\n   at MassTransit.Context.ServiceBusReceiveContext.DeliverMessageToConsumers(IReceiveContext context) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Context\\ServiceBusReceiveContext.cs:line 113\r\n2011-09-20 18:21:30,743 [ERROR] MassTransit.Transports.Endpoint - An exception was thrown by a message consumer\r\nMassTransit.Exceptions.MessageException: At least one consumer threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object.\r\n   at MassTransit.Transports.Msmq.MulticastSubscriptionClient.Consume(IConsumeContext`1 context) in c:\\OSS\\MassTransit\\git\\src\\Transports\\MassTransit.Transports.Msmq\\MulticastSubscriptionClient.cs:line 84\r\n   at MassTransit.SubscriptionConnectors.ContextInstanceSubscriptionConnector`2.<>c__DisplayClass3.<Connect>b__1(IConsumeContext`1 x) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Configuration\\SubscriptionConnectors\\ContextInstanceSubscriptionConnector.cs:line 35\r\n   at MassTransit.Pipeline.Sinks.InboundConvertMessageSink`1.<>c__DisplayClass2.<>c__DisplayClass4.<Enumerate>b__1(IConsumeContext x) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Pipeline\\Sinks\\InboundConvertMessageSink.cs:line 45\r\n   at MassTransit.Context.ServiceBusReceiveContext.DeliverMessageToConsumers(IReceiveContext context) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Context\\ServiceBusReceiveContext.cs:line 113\r\n   --- End of inner exception stack trace ---\r\n   at MassTransit.Context.ServiceBusReceiveContext.DeliverMessageToConsumers(IReceiveContext context) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Context\\ServiceBusReceiveContext.cs:line 129\r\n   at MassTransit.Transports.Endpoint.<>c__DisplayClass6.<>c__DisplayClass8.<Receive>b__5(IReceiveContext receiveContext) in c:\\OSS\\MassTransit\\git\\src\\MassTransit\\Transports\\Endpoint.cs:line 153\r\n2011-09-20 18:21:30,752 [DEBUG] MassTransit.Subscriptions.Coordinator.BusSubscriptionEventListener - SubscribeTo: Company.Bus.AsyncOutcomingMessage, Company, 223efbff-ee98-442e-8485-9f64012e8a1b\r\n2011-09-20 18:21:30,762 [DEBUG] MassTransit.Subscriptions.Coordinator.BusSubscriptionCache - SubscribeTo: Company.Bus.AsyncOutcomingMessage, Company, 223efbff-ee98-442e-8485-9f64012e8a1b\r\n2011-09-20 18:21:30,773 [DEBUG] MassTransit.Transports.Msmq.MessageQueueConnection - Creating MessageQueue: FormatName:DIRECT=OS:my-machine\\private$\\gateway_subscriptions_error\r\n2011-09-20 18:21:30,777 [DEBUG] MassTransit.Subscriptions.Coordinator.BusSubscription - SubscribeTo: Company.Bus.AsyncOutcomingMessage, Company, 00511f0b-a3f5-44c0-a36e-9f64012e8a23\r\n2011-09-20 18:21:30,791 [DEBUG] MassTransit.Msmq.MessageLog - SEND:FormatName:DIRECT=OS:my-machine\\private$\\gateway_subscriptions_error::ba3be140-9344-4849-96f5-acda6bb4872d\\786006\r\n2011-09-20 18:21:30,801 [DEBUG] MassTransit.Transports.Endpoint - MOVE:msmq-pgm://235.109.116.116:7786/gateway_subscriptions:msmq://my-machine/gateway_subscriptions_error?tx=false:ba3be140-9344-4849-96f5-acda6bb4872d\\785998\r\n\r\n\r\n```","comments":5,"title":"System.NullReferenceException at MassTransit.Transports.Msmq.MulticastSubscriptionClient.Consume","updated_at":"2011-10-13T13:51:34Z","url":"https://api.github.com/repos/phatboyg/MassTransit/issues/35","id":1689829,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/e89f43ee2b55b48a676029747831b583?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/NikGovorov","id":129254,"login":"NikGovorov"},"html_url":"https://github.com/phatboyg/MassTransit/issues/35","labels":[],"state":"open"},"legacy":{"issue_id":1689829,"comment_id":2394880}}