Skip to content

Instantly share code, notes, and snippets.

@marcioalthmann
Created June 13, 2011 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcioalthmann/1023026 to your computer and use it in GitHub Desktop.
Save marcioalthmann/1023026 to your computer and use it in GitHub Desktop.
Criando um Worker para o MassTransit, definindo a quantidade de consumidores concorrentes
DataBus = ServiceBusFactory.New(x =>
{
x.ReceiveFrom(ConfigurationManager.AppSettings["SourceQueue"]);
x.SetPurgeOnStartup(false);
x.UseMsmq();
x.UseMulticastSubscriptionClient(m => m.SetNetworkKey(ConfigurationManager.AppSettings["NetworkName"]));
x.SetConcurrentConsumerLimit(4);
x.UseDistributorFor<DoSimpleWorkItem>();
x.UseControlBus();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment