Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MoveToErrorQueue on exception causes NotSupportedException when ListenForMessagesFromExternalDatabaseTable option is used #1218

Closed
KnutFreyer opened this issue Jan 15, 2025 · 0 comments

Comments

@KnutFreyer
Copy link

When using the ListenForMessagesFromExternalDatabaseTable option, MoveToErrorQueue() on exception causes NotSupportedException.

To Reproduce

  1. Steps to reproduce the behavior:
  2. Setup a service to use ListenForMessagesFromExternalDatabaseTable option.
  3. Setup a message handler to raise an exception
  4. Configure the message handler like this:
public static void Configure(HandlerChain chain)
  {
    chain.OnException<Exception>().MoveToErrorQueue();
  }
  1. Insert message data into the external table
  2. Make sure that the message is processed
  3. Observe service output

Error Message:

System.NotSupportedException: Specified method is not supported.
   at Wolverine.RDBMS.Transport.ExternalMessageTable.CreateSender(IWolverineRuntime runtime) in /home/runner/work/wolverine/wolverine/src/Persistence/Wolverine.RDBMS/Transport/ExternalMessageTable.cs:line 41
   at Wolverine.Configuration.Endpoint.StartSending(IWolverineRuntime runtime, Uri replyUri) in /home/runner/work/wolverine/wolverine/src/Wolverine/Configuration/Endpoint.cs:line 426
   at Wolverine.Configuration.EndpointCollection.buildSendingAgent(Uri uri, Action`1 configureNewEndpoint) in /home/runner/work/wolverine/wolverine/src/Wolverine/Configuration/EndpointCollection.cs:line 324
   at Wolverine.Configuration.EndpointCollection.GetOrBuildSendingAgent(Uri address, Action`1 configureNewEndpoint) in /home/runner/work/wolverine/wolverine/src/Wolverine/Configuration/EndpointCollection.cs:line 138
   at Wolverine.Runtime.Routing.MessageRouterBase`1.RouteForUri(Uri destination) in /home/runner/work/wolverine/wolverine/src/Wolverine/Runtime/Routing/MessageRouterBase.cs:line 90
   at Wolverine.Runtime.Routing.MessageRouterBase`1.RouteToDestination(T message, Uri uri, DeliveryOptions options) in /home/runner/work/wolverine/wolverine/src/Wolverine/Runtime/Routing/MessageRouterBase.cs:line 79
   at Wolverine.Runtime.Routing.MessageRouterBase`1.RouteToDestination(Object message, Uri uri, DeliveryOptions options) in /home/runner/work/wolverine/wolverine/src/Wolverine/Runtime/Routing/MessageRouterBase.cs:line 59
   at Wolverine.Runtime.MessageContext.SendFailureAcknowledgementAsync(String failureDescription) in /home/runner/work/wolverine/wolverine/src/Wolverine/Runtime/MessageContext.cs:line 231
   at Wolverine.ErrorHandling.MoveToErrorQueue.ExecuteAsync(IEnvelopeLifecycle lifecycle, IWolverineRuntime runtime, DateTimeOffset now, Activity activity) in /home/runner/work/wolverine/wolverine/src/Wolverine/ErrorHandling/MoveToErrorQueue.cs:line 34
   at Wolverine.ErrorHandling.CompositeContinuation.ExecuteAsync(IEnvelopeLifecycle lifecycle, IWolverineRuntime runtime, DateTimeOffset now, Activity activity) in /home/runner/work/wolverine/wolverine/src/Wolverine/ErrorHandling/CompositeContinuation.cs:line 25

Expected behavior

  1. MoveToErrorQueue() does not cause an exception
  2. MoveToErrorQueue() moves the message/envelope to the dead letters table/queue

Environment
Desktop
Windows 11 Pro 23H2
Microsoft SQL Server Express (64-bit) Version 16.0.1135.2
and
Windows Server 2019 Standard (10.0)
Microsoft SQL Server Standard (64-bit) Version 15.0.4312.2
.Net 9
Wolverine 3.6.3

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

No branches or pull requests

1 participant