static void Main(string[] args)
{
var settings = ConfigurationManager.AppSettings;
var bus = Bus.Factory.CreateUsingRabbitMq(x =>
{
IRabbitMqHost host = x.Host(new Uri(settings["RabbitMQHost"]), h =>
{
h.Username(settings["RabbitMQUsername"]);
h.Password(settings["RabbitMQPassword"]);
});
Console.WriteLine("Connecting to {0} queue", settings["QueueName"]);
x.ReceiveEndpoint(
host,
settings["QueueName"],
e =>
{
e.Consumer<MyConsumer>();
// e has no method Turnout?
});
});
bus.Start();
Console.ReadKey();
bus.Stop();
}
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/8c27d121-1f69-4037-a7cb-df99affc8f09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public static void Turnout<T>(this IInMemoryReceiveEndpointConfigurator configurator, IInMemoryBusFactoryConfigurator busFactoryConfigurator,
public static void Turnout<T>(this IReceiveEndpointConfigurator configurator, IInMemoryBusFactoryConfigurator busFactoryConfigurator,
I would have to dig further into this, the feature was originally created for Azure Service Bus, but should work with any transport.I haven't worked with it lately, and it's probably not truly production ready, but it's been low on my list since the team it was created for hasn't gotten back to me after the initial bits were released.
--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a6a5a020-fb59-41e1-ab77-3653deb0f47f%40googlegroups.com.
var busControl = Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var rabbitMqHost = cfg.Host(new Uri("rabbitmq://localhost/sergetest"), h =>
{
h.Username("guest");
h.Password("guest");
});
cfg.PublisherConfirmation = true;
cfg.UseInMemoryScheduler();
cfg.ReceiveEndpoint(rabbitMqHost, "serge-long-commands", e =>
{
var temporaryQueueName = cfg.GetTemporaryQueueName($"turnout-");
cfg.ReceiveEndpoint(temporaryQueueName, turnoutEndpointConfigurator =>
{
TurnoutConfigurationExtensions.ConfigureTurnoutEndpoints<LongTransformation>(e, cfg, configurator =>
{
Console.WriteLine("Long running task configuration with turnout");
configurator.SuperviseInterval = TimeSpan.FromSeconds(2);
configurator.SetJobFactory(async context =>
{
await Task.Factory.StartNew(async () =>
{
Console.WriteLine("Start long running task... 60 seconds...");
await Task.Delay(60000);
Console.WriteLine("Long running task completed!!");
}).Unwrap();
Console.WriteLine("All long running task stuff done");
});
}, turnoutEndpointConfigurator);
});
});
});
busControl.Start();