We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to: rebus-org/Rebus.ServiceProvider#50
The text was updated successfully, but these errors were encountered:
Hello there, I just created a new solution (5.2.2) and added the configuration for Rebus.RabbitMq to test the integration.
I am facing the same issue of my handler being called twice when using Rebus+RabbitMq.
I have no special configuration. A simple event and a simple handler:
PreConfigure<AbpRebusEventBusOptions>(options => { var queueName = "eventbus"; options.InputQueueName = queueName; options.Configurer = rebusConfigurer => { rebusConfigurer.Transport(t => t.UseRabbitMq("amqp://localhost", queueName)); // rebusConfigurer.Subscriptions(s => s.UseJsonFile(@"subscriptions.json")); }; });
public class SampleEvent1 : IEvent { [Required] public string MyStringProp { get; set; } [Required] public int? MyIntProp { get; set; } [Required] public bool? MyBoolProp { get; set; } [Required] public DateTime? MyDateTimeProp { get; set; } }
public class SampleEvent1Handler : IDistributedEventHandler<SampleEvent1>, ITransientDependency { private readonly ILogger<SampleEvent1Handler> _logger; private readonly IDistributedEventBus _bus; public SampleEvent1Handler(ILogger<SampleEvent1Handler> logger, IDistributedEventBus bus) { _logger = logger; _bus = bus; } public Task HandleEventAsync(SampleEvent1 eventData) { _logger.LogInformation($"Received Event {eventData.GetType().FullName}"); var a = _bus; Thread.Sleep(10000); _logger.LogInformation($"Finished processing Event {eventData.GetType().FullName}"); return Task.CompletedTask; } }
Sorry, something went wrong.
realLiangshiwei
No branches or pull requests
Related to: rebus-org/Rebus.ServiceProvider#50
The text was updated successfully, but these errors were encountered: