Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Self-subscription goes to a wrong queue #122

Closed
ghost opened this issue Feb 27, 2014 · 1 comment
Closed

Self-subscription goes to a wrong queue #122

ghost opened this issue Feb 27, 2014 · 1 comment
Labels

Comments

@ghost
Copy link

ghost commented Feb 27, 2014

Using Azure Storage Queues transport, worker role subscribes to its own events using the configuration

<UnicastBusConfig>
    <MessageEndpointMappings>
      <add Assembly="EmailSignup.Messages" Namespace="EmailSignup.Messages.Events" Endpoint="emailsignupworkerinputqueue" />
    </MessageEndpointMappings>
  </UnicastBusConfig>

Prior to v5.1 Subscription table had a partition key with the right queue name:

emailsignupworkerinputqueue@DefaultEndpointsProtocol=https;AccountName=emailsignupservicetest;AccountKey=abcd

After v5.1 Subscription table contains a wrong partition key (wrong queue name):

EmailSignupWorker@DefaultEndpointsProtocol=https;AccountName=emailsignupservicetest;AccountKey=abcd

Note that queue name is wrong as well as not valid for ASQ. Handling of events is failing with the following exception:

The destination queue 'EmailSignupWorker@DefaultEndpointsProtocol=https;AccountName=emailsignupservicetest;AccountKey=abcd' could not be found. You may have misconfigured the destination for this kind of message (EmailSignup.Messages.Events.IGeoDataPersistedEvent) in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file. It may also be the case that the given queue just hasn't been created yet, or has been deleted.---> NServiceBus.Unicast.Queuing.QueueNotFoundException: Exception of type 'NServiceBus.Unicast.Queuing.QueueNotFoundException' was thrown.\r\n at NServiceBus.Azure.Transports.WindowsAzureStorageQueues.AzureMessageQueueSender.Send(TransportMessage message, Address address)\r\n at NServiceBus.Unicast.Publishing.StorageDrivenPublisher.Publish(TransportMessage message, IEnumerable1 eventTypes)\r\n at NServiceBus.Unicast.Behaviors.DispatchMessageToTransportBehavior.Invoke(SendPhysicalMessageContext context, Action next)\r\n --- End of inner exception stack trace ---\r\n at NServiceBus.Unicast.Behaviors.DispatchMessageToTransportBehavior.Invoke(SendPhysicalMessageContext context, Action next)\r\n at NServiceBus.MessageMutator.MutateOutgoingPhysicalMessageBehavior.Invoke(SendPhysicalMessageContext context, Action next)\r\n at NServiceBus.Unicast.Behaviors.SerializeMessagesBehavior.Invoke(SendPhysicalMessageContext context, Action next)\r\n at NServiceBus.Pipeline.PipelineExecutor.Execute[T](BehaviorChain1 pipelineAction, T context)\r\n at NServiceBus.Unicast.Behaviors.CreatePhysicalMessageBehavior.Invoke(SendLogicalMessagesContext context, Action next)\r\n at NServiceBus.Unicast.Behaviors.MultiSendValidatorBehavior.Invoke(SendLogicalMessagesContext context, Action next)\r\n at NServiceBus.Pipeline.PipelineExecutor.Execute[T](BehaviorChain1 pipelineAction, T context)\r\n at NServiceBus.Pipeline.PipelineExecutor.InvokeSendPipeline(SendOptions sendOptions, IEnumerable1 messages)\r\n at NServiceBus.Unicast.UnicastBus.Publish[T](T[] messages)\r\n at EmailSignupWorker.AddSubscriberHandler.Handle(AddSubscriber message)\r\n at NServiceBus.Unicast.HandlerInvocationCache.Invoke(Object handler, Object message, Dictionary2 dictionary)\r\n at NServiceBus.Unicast.Behaviors.InvokeHandlersBehavior.Invoke(HandlerInvocationContext context, Action next)\r\n at NServiceBus.Sagas.SagaPersistenceBehavior.Invoke(HandlerInvocationContext context, Action next)\r\n at NServiceBus.Sagas.AuditInvokedSagaBehavior.Invoke(HandlerInvocationContext context, Action next)\r\n at NServiceBus.Unicast.Behaviors.SetCurrentMessageBeingHandledBehavior.Invoke(HandlerInvocationContext context, Action next)\r\n at NServiceBus.Pipeline.PipelineExecutor.Execute[T](BehaviorChain1 pipelineAction, T context)\r\n at NServiceBus.Unicast.Behaviors.LoadHandlersBehavior.Invoke(ReceiveLogicalMessageContext context, Action next)\r\n at NServiceBus.DataBus.DataBusReceiveBehavior.Invoke(ReceiveLogicalMessageContext context, Action next)\r\n at NServiceBus.Pipeline.MessageMutator.ApplyIncomingMessageMutatorsBehavior.Invoke(ReceiveLogicalMessageContext context, Action next)\r\n at NServiceBus.Pipeline.PipelineExecutor.Execute[T](BehaviorChain`1 pipelineAction, T context)\r\n at NServiceBus.Unicast.Messages.ExecuteLogicalMessagesBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)\r\n at NServiceBus.Unicast.Behaviors.CallbackInvocationBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)\r\n at NServiceBus.Unicast.Messages.ExtractLogicalMessagesBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)\r\n at NServiceBus.Sagas.RemoveIncomingHeadersBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)\r\n at NServiceBus.MessageMutator.ApplyIncomingTransportMessageMutatorsBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)\r\n at NServiceBus.UnitOfWork.UnitOfWorkBehavior.Invoke(ReceivePhysicalMessageContext context, Action next)",
"NServiceBus.FailedQ": "emailsignupworkerinputqueue@DefaultEndpointsProtocol=https;AccountName=emailsignupservicetest;AccountKey=abcd"

At the time of upgrade to NSB.Azure v5.1 there were no other code changes.

@yvesgoeleven
Copy link
Contributor

Fixed in 4.4.2 of the core

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants