[Option('h', "host", HelpText = "Hostname of the RabbitMQ server.", Default = "localhost")]
publicstringHost{get;set;}
[Option('p', "port", HelpText = "AMQP port of the RabbitMQ server.", Default = 5672)]
publicintPort{get;set;}
[Option('v', "virtualhost", HelpText = "Virtual host used for the RabbitMQ connection.", Default = "/")]
publicstringVirtualHost{get;set;}
[Option('u', "username", HelpText = "Username used to connect to the RabbitMQ server.", Default = "guest")]
publicstringUsername{get;set;}
[Option('p', "password", HelpText = "Password used to connect to the RabbitMQ server.", Default = "guest")]
publicstringPassword{get;set;}
}
publicenumSerializationMethod
{
SingleFileJSON,
EasyNetQHosepipe
}
publicclassMessageSerializerOptions:CommonOptions
{
[Option('s', "serialization", HelpText = "The method used to serialize the message for import or export. Valid options: SingleFileJSON, EasyNetQHosepipe.", Default = SerializationMethod.SingleFileJSON)]
[Verb("export", HelpText = "Fetch messages from a queue and write it to disk.")]
publicclassExportOptions:MessageSerializerOptions
{
[Option('q', "queue", Required = true, HelpText = "The queue to read the messages from.")]
publicstringQueueName{get;set;}
[Option('o', "output", Required = true, HelpText = "Path or filename (depending on the chosen serialization method) where the messages will be output to.")]
publicstringOutputPath{get;set;}
[Option('r', "remove", HelpText = "If specified messages are acknowledged and removed from the queue. If not messages are kept.")]
publicboolRemoveMessages{get;set;}
[Option('n', "maxcount", HelpText = "(Default: all) Maximum number of messages to retrieve from the queue.")]
publicint?MaxCount{get;set;}
}
[Verb("import", HelpText = "Read messages from disk as previously exported and publish them to a queue.")]
publicclassImportOptions:MessageSerializerOptions
{
[Option('i', "input", Required = true, HelpText = "Path or filename (depending on the chosen serialization method) where the messages will be read from.")]
publicstringInput{get;set;}
[Option('e', "exchange", HelpText = "If specified publishes to the originating exchange using the original routing key. By default these are ignored and the message is published directly to the originating queue.")]
publicboolPublishToExchange{get;set;}
}
[Verb("shovel", HelpText = "Reads messages from a queue and publishes them to another queue, optionally to another RabbitMQ server.")]
publicclassShovelOptions:CommonOptions
{
[Option('q', "queue", Required = true, HelpText = "The queue to read the messages from.")]
publicstringQueueName{get;set;}
[Option('t', "targetqueue", HelpText = "The target queue to publish the messages to. Defaults to the source queue if a different target host, port or virtualhost is specified. Otherwise it must be different from the source queue.")]
publicstringTargetQueueName{get;set;}
[Option('r', "remove", HelpText = "If specified messages are acknowledged and removed from the source queue. If not messages are kept.")]
publicboolRemoveMessages{get;set;}
[Option('n', "maxcount", HelpText = "(Default: all) Maximum number of messages to retrieve from the queue.")]
publicint?MaxCount{get;set;}
[Option("targethost", HelpText = "Hostname of the target RabbitMQ server. Defaults to the source host. Note that you may still specify a different targetusername for example.")]
publicstringTargetHost{get;set;}
[Option("targetport", HelpText = "AMQP port of the target RabbitMQ server. Defaults to the source port.")]
publicint?TargetPort{get;set;}
[Option("targetvirtualhost", HelpText = "Virtual host used for the target RabbitMQ connection. Defaults to the source virtualhost.")]
publicstringTargetVirtualHost{get;set;}
[Option("targetusername", HelpText = "Username used to connect to the target RabbitMQ server. Defaults to the source username.")]
publicstringTargetUsername{get;set;}
[Option("targetpassword", HelpText = "Password used to connect to the target RabbitMQ server. Defaults to the source password.")]
[Option('h', "host", HelpText = "Hostname of the RabbitMQ server.", Default = "localhost")]
publicstringHost{get;set;}
[Option("port", HelpText = "AMQP port of the RabbitMQ server.", Default = 5672)]
publicintPort{get;set;}
[Option('v', "virtualhost", HelpText = "Virtual host used for the RabbitMQ connection.", Default = "/")]
publicstringVirtualHost{get;set;}
[Option('u', "username", HelpText = "Username used to connect to the RabbitMQ server.", Default = "guest")]
publicstringUsername{get;set;}
[Option('p', "password", HelpText = "Password used to connect to the RabbitMQ server.", Default = "guest")]
publicstringPassword{get;set;}
}
publicenumSerializationMethod
{
SingleFileJSON,
EasyNetQHosepipe
}
publicclassMessageSerializerOptions:CommonOptions
{
[Option('s', "serialization", HelpText = "The method used to serialize the message for import or export. Valid options: SingleFileJSON, EasyNetQHosepipe.", Default = SerializationMethod.SingleFileJSON)]
[Verb("export", HelpText = "Fetch messages from a queue and write it to disk.")]
publicclassExportOptions:MessageSerializerOptions
{
[Option('q', "queue", Required = true, HelpText = "The queue to read the messages from.")]
publicstringQueueName{get;set;}
[Option('o', "output", Required = true, HelpText = "Path or filename (depending on the chosen serialization method) where the messages will be output to.")]
publicstringOutputPath{get;set;}
[Option('r', "remove", HelpText = "If specified messages are acknowledged and removed from the queue. If not messages are kept.")]
publicboolRemoveMessages{get;set;}
[Option('n', "maxcount", HelpText = "(Default: all) Maximum number of messages to retrieve from the queue.")]
publicint?MaxCount{get;set;}
}
[Verb("import", HelpText = "Read messages from disk as previously exported and publish them to a queue.")]
publicclassImportOptions:MessageSerializerOptions
{
[Option('i', "input", Required = true, HelpText = "Path or filename (depending on the chosen serialization method) where the messages will be read from.")]
publicstringInput{get;set;}
[Option('e', "exchange", HelpText = "If specified publishes to the originating exchange using the original routing key. By default these are ignored and the message is published directly to the originating queue.")]
publicboolPublishToExchange{get;set;}
}
[Verb("shovel", HelpText = "Reads messages from a queue and publishes them to another queue, optionally to another RabbitMQ server.")]
publicclassShovelOptions:CommonOptions
{
[Option('q', "queue", Required = true, HelpText = "The queue to read the messages from.")]
publicstringQueueName{get;set;}
[Option('t', "targetqueue", HelpText = "The target queue to publish the messages to. Defaults to the source queue if a different target host, port or virtualhost is specified. Otherwise it must be different from the source queue.")]
publicstringTargetQueueName{get;set;}
[Option('r', "remove", HelpText = "If specified messages are acknowledged and removed from the source queue. If not messages are kept.")]
publicboolRemoveMessages{get;set;}
[Option('n', "maxcount", HelpText = "(Default: all) Maximum number of messages to retrieve from the queue.")]
publicint?MaxCount{get;set;}
[Option("targethost", HelpText = "Hostname of the target RabbitMQ server. Defaults to the source host. Note that you may still specify a different targetusername for example.")]
publicstringTargetHost{get;set;}
[Option("targetport", HelpText = "AMQP port of the target RabbitMQ server. Defaults to the source port.")]
publicint?TargetPort{get;set;}
[Option("targetvirtualhost", HelpText = "Virtual host used for the target RabbitMQ connection. Defaults to the source virtualhost.")]
publicstringTargetVirtualHost{get;set;}
[Option("targetusername", HelpText = "Username used to connect to the target RabbitMQ server. Defaults to the source username.")]
publicstringTargetUsername{get;set;}
[Option("targetpassword", HelpText = "Password used to connect to the target RabbitMQ server. Defaults to the source password.")]
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.