Masstransit: 'IRetryConfigurator' does not contain a definition for 'Immediate' and the best extension method overload 'Retry.Immediate(IExceptionFilter, int)' requires a receiver of type 'IExceptionFilter'

Created on 14 Nov 2019  路  4Comments  路  Source: MassTransit/MassTransit

Is this a bug report?

Yes

Can you also reproduce the problem with the latest version?

Yes

Environment

  1. Operating system: Manjaro Linux, Kernel 5.3
  2. Visual Studio version: Visual Studio Code 1.40
  3. Dotnet version: .NET Core 2.2
  4. MassTransit version: 5.5.6

Steps to Reproduce

(Write your steps here:)

  1. Create a simple Bus and Endpoint following the official examples
  2. Try to set up message retry with endpoint.UseMessageRetry(r => r.Immediate(5));

Expected Behavior

Type checking succeeds and message retry is configured

Actual Behavior

Type error.

'IRetryConfigurator' does not contain a definition for 'Immediate' and the best extension method overload 'Retry.Immediate(IExceptionFilter, int)' requires a receiver of type 'IExceptionFilter'

image

Same thing happens for every other kind of retry method. Exponential, Immediate, etc.

Most helpful comment

Most likely you need to add

using GreenPipes;

All 4 comments

You are probably missing a namespace reference. This works literally everywhere, in every sample, so check your namespace using statements.

Most likely you need to add

using GreenPipes;

Awesome, that worked. Is that information mentioned in the docs anywhere? It definitely threw me off as a beginner :p

I'm not sure, I'll make a note, but most modern IDE's know how to resolve using statements that are missing. Not sure about VS Code (I used Rider on a Mac).

Was this page helpful?
0 / 5 - 0 ratings