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

Exception when update to last version and using UsePubSubAsOneWayClient #13

Open
censurados opened this issue Sep 27, 2024 · 0 comments

Comments

@censurados
Copy link

I'm updating the project to .NET 8 and upgrading from version 0.0.7 to the latest (0.0.11). When I do this, I encounter the following exception:

Rebus.Injection.ResolutionException: Could not resolve Rebus.Bus.IBus with decorator depth 0 - registrations: Rebus.Injection.Injectionist+Handler
---> System.ArgumentNullException: Value cannot be null. (Parameter 'topic')
at Google.Api.Gax.GaxPreconditions.CheckNotNull[T](T argument, String paramName)
at Google.Cloud.PubSub.V1.PublisherServiceApiClient.GetTopic(TopicName topic, CallSettings callSettings)
at Rebus.GoogleCloudPubSub.GoogleCloudPubSubTransport.CreateQueue(String address)
at Rebus.AutoScaling.AutoScaler.CreateQueue(String address)
at Rebus.Retry.PoisonQueues.DeadletterQueueErrorHandler.Initialize()
at Rebus.Config.RebusConfigurer.<>c__DisplayClass14_0.b__30(IResolutionContext c)
at Rebus.Injection.Injectionist.Resolver1.InvokeResolver(IResolutionContext context) at Rebus.Injection.Injectionist.ResolutionContext.Get[TService]() --- End of inner exception stack trace --- at Rebus.Injection.Injectionist.ResolutionContext.Get[TService]() at Rebus.Injection.Injectionist.Get[TService]() at Rebus.Config.RebusConfigurer.Start() at Rebus.Config.DelayedStartupConfigurationExtensions.Create(RebusConfigurer configurer) at Rebus.ServiceProvider.Internals.RebusInitializer.<GetLazyInitializer>b__9_0() at Rebus.ServiceProvider.Internals.RebusBackgroundService.ExecuteAsync(CancellationToken stoppingToken) at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__15_1(IHostedService service, CancellationToken token) at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)

The way I am performing the injection:

busConfig
.Logging(l => l.Serilog(endpointLogger))
.Options(options =>
{
options.LogPipeline();
options.EnableAutoScaling(rebusOptions.MaxNumberOfWorkers, rebusOptions.MaxNumberOfParallelism);

                options.EnableCompression();
                options.EnableCustomEncryption().Register(_ => provider.GetRequiredService<IEnvelopeEncryptor>());

                options.AddDecorators();

                options.RetryStrategy(errorQueueName: $"{rebusOptions.QueueName}-error", secondLevelRetriesEnabled: true);
            })
            .Transport(trans => trans.UsePubSubAsOneWayClient(googleCloudOptions1.ProjectId))
            .Routing(routing => routing
                .TypeBased()
                .MapAssemblyOf<BaseBrokerMessage>(rebusOptions.QueueName));

I have installed the following packages:

After some tests, I found that version 0.0.10 seems to work without any issues. I would like to understand why the latest version does not work, if possible.

Greetings,
Filipe Silva

@censurados censurados changed the title Exception when update to last version Exception when update to last version and using UsePubSubAsOneWayClient Sep 27, 2024
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