Giter VIP home page Giter VIP logo

metrobus's People

Contributors

gokgokalp avatar ocinbat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

metrobus's Issues

UseMessageSchedulerWithQuartz

Hocam selam,
Metrobus , UseMessageSchedulerWithQuartz methodunı nasıl kullanıp ayarlanıyor?

methodun aldığı parametreye göre ;

            services.AddMetroBus(x => x.AddConsumer<WorkerConsumer>());

            services.AddSingleton(provider => MetroBusInitializer.Instance
                    .UseRabbitMq(mqConstant.RabbitMQUri, mqConstant.RabbitMQUserName, mqConstant.RabbitMQPassword)
                    .RegisterConsumer<WorkerConsumer>("ilan.schedule.queue", provider)
                    .UseMessageSchedulerWithQuartz("rabbitmq://localhost/quartz")
                    .SetPrefetchCount(16)
                    .UseRateLimiter(20, TimeSpan.FromMinutes(10.0))
                   
                    .Build())
                .BuildServiceProvider();


            services.AddHostedService<BusService>();
            

biçimde ayarladım

consumer ;

 public class WorkerConsumer : IConsumer<WorkerCommand>
    {
        private readonly ILogger<WorkerConsumer> Logger;
        readonly Uri NotificationService;

        public WorkerConsumer(ILogger<WorkerConsumer> logger)
        {
            Logger = logger;
            NotificationService = new Uri("rabbitmq://localhost/notification.queue");
       }

        public Task Consume(ConsumeContext<WorkerCommand> context)
        {
            var IlanId = context.Message.IlanId;
            var EstimateDate = context.Message.EstimateDate;

            context.ScheduleSend(NotificationService, EstimateDate, new NotifyCommand
            {
                IlanId = IlanId
            });
     
            return Task.CompletedTask;
        }

    }
}

çalıştırdıktan sonra estime tarihinde işlem yapmıyor.

'MassTransit.ExtensionsDependencyInjectionIntegration.Configuration.Registration.DependencyInjectionContainerR egistrar

Selam,
.Net Core 3.1'a upgrade yaptığımda aşağıdaki exceptionı alıyorum ;

System.TypeLoadException: Method 'RegisterExecuteActivity' on type 'MassTransit.ExtensionsDependencyInjectionIntegration.Configuration.Registration.DependencyInjectionContainerR
egistrar' from assembly 'MassTransit.ExtensionsDependencyInjectionIntegration, Version=5.5.2.0, Culture=neutral, PublicKeyToken=b8e0e9f2f1e657fa' tried to implicitly implement a
n interface method with weaker type parameter constraints.
   at MassTransit.ExtensionsDependencyInjectionIntegration.Configuration.Registration.ServiceCollectionConfigurator..ctor(IServiceCollection collection)
   at MassTransit.DependencyInjectionRegistrationExtensions.AddMassTransit(IServiceCollection collection, Action`1 configure)
   at MetroBus.Microsoft.Extensions.DependencyInjection.MetroBusExtensions.AddMetroBus(IServiceCollection serviceCollection, Action`1 configure)
   at ilan.BusConfig.UseBusService(IServiceCollection services, MqConstant mqConstant) in D:\Projects\x\ilan\BusConfig.cs:line 15
   at ilan.Startup.ConfigureServices(IServiceCollection services) in D:\Projects\x\ilan\Startup.cs:line 64
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at ilan.Program.Main(String[] args) in D:\Projects\x\x\Program.cs:line 32

Problem;

 public class BusService : IHostedService
    {
        private readonly IBusControl BusControl;

        public BusService(IBusControl busControl)
        {
            BusControl = busControl;
        }

        public Task StartAsync(CancellationToken cancellationToken)
        {
            return BusControl.StartAsync(cancellationToken);
        }

        public Task StopAsync(CancellationToken cancellationToken)
        {
            return BusControl.StopAsync(cancellationToken);
        }

IBusControl'ı inject yaparken oluyor.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.