Skip to content

Commit 5fb3afb

Browse files
committedSep 16, 2021
Merge branch 'release/2.7.6'
2 parents e8e0946 + a9a38f2 commit 5fb3afb

File tree

23 files changed

+265
-81
lines changed

23 files changed

+265
-81
lines changed
 

‎Tapeti.Annotations/Tapeti.Annotations.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@
2424
</None>
2525
</ItemGroup>
2626

27+
<ItemGroup>
28+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
29+
</ItemGroup>
2730
</Project>

‎Tapeti.Autofac/Tapeti.Autofac.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
</None>
2929
</ItemGroup>
3030

31+
<ItemGroup>
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33+
</ItemGroup>
3134
</Project>

‎Tapeti.CastleWindsor/Tapeti.CastleWindsor.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
</None>
2929
</ItemGroup>
3030

31+
<ItemGroup>
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33+
</ItemGroup>
3134
</Project>

‎Tapeti.Cmd/ConsoleHelper/ConsoleWrapper.cs

+83-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Text;
34
using System.Threading;
5+
using Console = System.Console;
46

57
namespace Tapeti.Cmd.ConsoleHelper
68
{
@@ -138,39 +140,79 @@ public virtual void Dispose()
138140

139141
public abstract bool Enabled { get; }
140142

143+
public abstract void WriteCaptured(string value, Action processInput);
141144
public abstract void WriteLine(string value);
142145

143146

144147
public void Confirm(string message)
145148
{
146149
WriteLine(message);
147-
TryReadKey(false, out _);
148-
}
149150

151+
// Clear any previous key entered before this confirmation
152+
while (!Owner.Cancelled && Console.KeyAvailable)
153+
Console.ReadKey(true);
150154

151-
public bool ConfirmYesNo(string message)
152-
{
153-
WriteLine($"{message} (Y/N) ");
154-
if (!TryReadKey(true, out var key))
155-
return false;
155+
while (!Owner.Cancelled && !Console.KeyAvailable)
156+
Thread.Sleep(50);
157+
158+
if (Owner.Cancelled)
159+
return;
156160

157-
return key.KeyChar == 'y' || key.KeyChar == 'Y';
161+
Console.ReadKey(true);
158162
}
159163

160164

161-
private bool TryReadKey(bool showKeyOutput, out ConsoleKeyInfo keyInfo)
165+
public bool ConfirmYesNo(string message)
162166
{
163-
while (!Owner.Cancelled && !Console.KeyAvailable)
164-
Thread.Sleep(50);
167+
var confirmed = false;
165168

166-
if (Owner.Cancelled)
169+
WriteCaptured($"{message} (Y/N) ", () =>
167170
{
168-
keyInfo = default;
169-
return false;
170-
}
171-
172-
keyInfo = Console.ReadKey(!showKeyOutput);
173-
return true;
171+
// Clear any previous key entered before this confirmation
172+
while (!Owner.Cancelled && Console.KeyAvailable)
173+
Console.ReadKey(true);
174+
175+
var input = new StringBuilder();
176+
177+
while (!Owner.Cancelled)
178+
{
179+
if (!Console.KeyAvailable)
180+
{
181+
Thread.Sleep(50);
182+
continue;
183+
}
184+
185+
var keyInfo = Console.ReadKey(false);
186+
187+
// ReSharper disable once SwitchStatementHandlesSomeKnownEnumValuesWithDefault - by design
188+
switch (keyInfo.Key)
189+
{
190+
case ConsoleKey.Enter:
191+
Console.WriteLine();
192+
confirmed = input.ToString().Equals("Y", StringComparison.CurrentCultureIgnoreCase);
193+
return;
194+
195+
case ConsoleKey.Backspace:
196+
if (input.Length > 0)
197+
{
198+
input.Remove(input.Length - 1, 1);
199+
200+
// We need to handle erasing the character ourselves, as we want to use ReadKey so that we can monitor Cancelled
201+
Console.Write(" \b");
202+
}
203+
204+
break;
205+
206+
default:
207+
if (keyInfo.KeyChar != -1)
208+
input.Append(keyInfo.KeyChar);
209+
210+
break;
211+
}
212+
}
213+
});
214+
215+
return confirmed;
174216
}
175217
}
176218

@@ -185,6 +227,22 @@ public PermanentWriter(ConsoleWrapper owner) : base(owner)
185227
public override bool Enabled => true;
186228

187229

230+
231+
public override void WriteCaptured(string value, Action waitForInput)
232+
{
233+
Owner.AcquirePermanent();
234+
try
235+
{
236+
Console.Write(value);
237+
waitForInput();
238+
}
239+
finally
240+
{
241+
Owner.ReleasePermanent();
242+
}
243+
}
244+
245+
188246
public override void WriteLine(string value)
189247
{
190248
Owner.AcquirePermanent();
@@ -217,6 +275,13 @@ public TemporaryWriter(ConsoleWrapper owner, int relativePosition) : base(owner)
217275
public override bool Enabled => !Console.IsOutputRedirected;
218276

219277

278+
public override void WriteCaptured(string value, Action waitForInput)
279+
{
280+
WriteLine(value);
281+
waitForInput();
282+
}
283+
284+
220285
public override void WriteLine(string value)
221286
{
222287
if (!Enabled)

‎Tapeti.Cmd/RateLimiter/BatchSizeRateLimiter.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void Execute(Action action)
2626
if (batchCount > batchSize)
2727
{
2828
Pause(console);
29-
batchCount = 0;
29+
batchCount = 1;
3030
}
3131

3232
decoratedRateLimiter.Execute(action);

‎Tapeti.Cmd/Serialization/EasyNetQMessageSerializer.cs

+6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ public EasyNetQMessageSerializer(string path)
3131
}
3232

3333

34+
public static bool OutputExists(string path)
35+
{
36+
return Directory.Exists(path) && Directory.GetFiles(path, "*.message.txt").Length > 0;
37+
}
38+
39+
3440
public void Dispose()
3541
{
3642
}

‎Tapeti.Cmd/Verbs/ExportVerb.cs

+51-22
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.IO;
33
using System.Text;
44
using CommandLine;
5-
using RabbitMQ.Client;
65
using Tapeti.Cmd.ConsoleHelper;
76
using Tapeti.Cmd.Serialization;
87

@@ -17,10 +16,16 @@ public class ExportOptions : BaseMessageSerializerOptions
1716

1817
[Option('o', "output", Required = true, HelpText = "Path or filename (depending on the chosen serialization method) where the messages will be output to.")]
1918
public string OutputPath { get; set; }
19+
20+
[Option('y', "overwrite", HelpText = "If the output exists, do not ask to overwrite.")]
21+
public bool Overwrite { get; set; }
2022

2123
[Option('r', "remove", HelpText = "If specified messages are acknowledged and removed from the queue. If not messages are kept.")]
2224
public bool RemoveMessages { get; set; }
2325

26+
[Option("skip", HelpText = "(Default: 0) Number of messages in the queue to skip. Useful if a previous non-removing export was interrupted.", Default = 0)]
27+
public int Skip { get; set; }
28+
2429
[Option('n', "maxcount", HelpText = "(Default: all) Maximum number of messages to retrieve from the queue.")]
2530
public int? MaxCount { get; set; }
2631
}
@@ -40,12 +45,21 @@ public ExportVerb(ExportOptions options)
4045
public void Execute(IConsole console)
4146
{
4247
var consoleWriter = console.GetPermanentWriter();
48+
49+
using var messageSerializer = GetMessageSerializer(options, consoleWriter);
50+
if (messageSerializer == null)
51+
return;
52+
4353
var factory = options.CreateConnectionFactory(console);
44-
using var messageSerializer = GetMessageSerializer(options);
4554
using var connection = factory.CreateConnection();
4655
using var channel = connection.CreateModel();
4756

4857
var totalCount = (int)channel.MessageCount(options.QueueName);
58+
59+
var skip = Math.Max(options.Skip, 0);
60+
if (skip > 0)
61+
totalCount -= Math.Min(skip, totalCount);
62+
4963
if (options.MaxCount.HasValue && options.MaxCount.Value < totalCount)
5064
totalCount = options.MaxCount.Value;
5165

@@ -61,41 +75,56 @@ public void Execute(IConsole console)
6175
// No more messages on the queue
6276
break;
6377

64-
messageCount++;
65-
66-
messageSerializer.Serialize(new Message
78+
if (skip > 0)
79+
skip--;
80+
else
6781
{
68-
DeliveryTag = result.DeliveryTag,
69-
Redelivered = result.Redelivered,
70-
Exchange = result.Exchange,
71-
RoutingKey = result.RoutingKey,
72-
Queue = options.QueueName,
73-
Properties = result.BasicProperties,
74-
Body = result.Body.ToArray()
75-
});
76-
77-
if (options.RemoveMessages)
78-
channel.BasicAck(result.DeliveryTag, false);
79-
80-
81-
progressBar.Report(messageCount);
82+
messageCount++;
83+
84+
messageSerializer.Serialize(new Message
85+
{
86+
DeliveryTag = result.DeliveryTag,
87+
Redelivered = result.Redelivered,
88+
Exchange = result.Exchange,
89+
RoutingKey = result.RoutingKey,
90+
Queue = options.QueueName,
91+
Properties = result.BasicProperties,
92+
Body = result.Body.ToArray()
93+
});
94+
95+
if (options.RemoveMessages)
96+
channel.BasicAck(result.DeliveryTag, false);
97+
98+
progressBar.Report(messageCount);
99+
}
82100
}
83101
}
84102

85103
consoleWriter.WriteLine($"{messageCount} message{(messageCount != 1 ? "s" : "")} exported.");
86104
}
87105

88106

89-
private static IMessageSerializer GetMessageSerializer(ExportOptions options)
107+
private static IMessageSerializer GetMessageSerializer(ExportOptions options, IConsoleWriter consoleWriter)
90108
{
91109
switch (options.SerializationMethod)
92110
{
93111
case SerializationMethod.SingleFileJSON:
112+
// ReSharper disable once InvertIf - causes two lines of "new SingleFileJSONMessageSerializer". DRY ReSharper.
113+
if (!options.Overwrite && File.Exists(options.OutputPath))
114+
{
115+
if (!consoleWriter.ConfirmYesNo($"The output file '{options.OutputPath}' already exists, do you want to overwrite it?"))
116+
return null;
117+
}
118+
94119
return new SingleFileJSONMessageSerializer(new FileStream(options.OutputPath, FileMode.Create, FileAccess.Write, FileShare.Read), true, Encoding.UTF8);
95120

96121
case SerializationMethod.EasyNetQHosepipe:
97-
if (string.IsNullOrEmpty(options.OutputPath))
98-
throw new ArgumentException("An output path must be provided when using EasyNetQHosepipe serialization");
122+
// ReSharper disable once InvertIf - causes two lines of "new SingleFileJSONMessageSerializer". DRY ReSharper.
123+
if (!options.Overwrite && EasyNetQMessageSerializer.OutputExists(options.OutputPath))
124+
{
125+
if (!consoleWriter.ConfirmYesNo($"The output path '{options.OutputPath}' already contains a previous export, do you want to overwrite it?"))
126+
return null;
127+
}
99128

100129
return new EasyNetQMessageSerializer(options.OutputPath);
101130

‎Tapeti.Cmd/Verbs/ImportVerb.cs

+26-16
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public class ImportOptions : BaseMessageSerializerOptions
2828

2929
[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.")]
3030
public bool PublishToExchange { get; set; }
31+
32+
[Option("skip", HelpText = "(Default: 0) Number of messages in the input to skip. Useful if a previous import was interrupted.", Default = 0)]
33+
public int Skip { get; set; }
34+
35+
[Option('n', "maxcount", HelpText = "(Default: all) Maximum number of messages to import.")]
36+
public int? MaxCount { get; set; }
3137

3238
[Option("maxrate", HelpText = "The maximum amount of messages per second to import.")]
3339
public int? MaxRate { get; set; }
@@ -61,6 +67,7 @@ public void Execute(IConsole console)
6167

6268
var totalCount = messageSerializer.GetMessageCount();
6369
var messageCount = 0;
70+
var skip = Math.Max(options.Skip, 0);
6471

6572

6673
ProgressBar progress = null;
@@ -70,24 +77,27 @@ public void Execute(IConsole console)
7077
{
7178
foreach (var message in messageSerializer.Deserialize(channel))
7279
{
73-
if (console.Cancelled)
80+
if (console.Cancelled || (options.MaxCount.HasValue && messageCount >= options.MaxCount.Value))
7481
break;
7582

76-
rateLimiter.Execute(() =>
77-
{
78-
if (console.Cancelled)
79-
return;
80-
81-
var exchange = options.PublishToExchange ? message.Exchange : "";
82-
var routingKey = options.PublishToExchange ? message.RoutingKey : message.Queue;
83-
84-
// ReSharper disable AccessToDisposedClosure
85-
channel.BasicPublish(exchange, routingKey, message.Properties, message.Body);
86-
messageCount++;
87-
88-
progress?.Report(messageCount);
89-
// ReSharper restore AccessToDisposedClosure
90-
});
83+
if (skip > 0)
84+
skip--;
85+
else
86+
rateLimiter.Execute(() =>
87+
{
88+
if (console.Cancelled)
89+
return;
90+
91+
var exchange = options.PublishToExchange ? message.Exchange : "";
92+
var routingKey = options.PublishToExchange ? message.RoutingKey : message.Queue;
93+
94+
// ReSharper disable AccessToDisposedClosure
95+
channel.BasicPublish(exchange, routingKey, message.Properties, message.Body);
96+
messageCount++;
97+
98+
progress?.Report(messageCount);
99+
// ReSharper restore AccessToDisposedClosure
100+
});
91101
}
92102
}
93103
finally

‎Tapeti.Cmd/Verbs/ShovelVerb.cs

+20
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public class ShovelOptions : BaseConnectionOptions
3737
[Option("targetpassword", HelpText = "Password used to connect to the target RabbitMQ server. Defaults to the source password.")]
3838
public string TargetPassword { get; set; }
3939

40+
[Option("skip", HelpText = "(Default: 0) Number of messages in the queue to skip. Useful if a previous non-removing shovel was interrupted.", Default = 0)]
41+
public int Skip { get; set; }
42+
4043
[Option("maxrate", HelpText = "The maximum amount of messages per second to shovel.")]
4144
public int? MaxRate { get; set; }
4245

@@ -93,6 +96,11 @@ private static void Shovel(IConsole console, ShovelOptions options, IModel sourc
9396
var targetQueueName = !string.IsNullOrEmpty(options.TargetQueueName) ? options.TargetQueueName : options.QueueName;
9497

9598
var totalCount = (int)sourceChannel.MessageCount(options.QueueName);
99+
100+
var skip = Math.Max(options.Skip, 0);
101+
if (skip > 0)
102+
totalCount -= Math.Min(skip, totalCount);
103+
96104
if (options.MaxCount.HasValue && options.MaxCount.Value < totalCount)
97105
totalCount = options.MaxCount.Value;
98106

@@ -101,6 +109,18 @@ private static void Shovel(IConsole console, ShovelOptions options, IModel sourc
101109

102110
using (var progressBar = new ProgressBar(console, totalCount))
103111
{
112+
// Perform the skips outside of the rate limiter
113+
while (skip > 0 && !console.Cancelled)
114+
{
115+
var result = sourceChannel.BasicGet(options.QueueName, false);
116+
if (result == null)
117+
// No more messages on the queue
118+
return;
119+
120+
skip--;
121+
}
122+
123+
104124
var hasMessage = true;
105125

106126
while (!console.Cancelled && hasMessage && (!options.MaxCount.HasValue || messageCount < options.MaxCount.Value))

‎Tapeti.DataAnnotations.Extensions/Tapeti.DataAnnotations.Extensions.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
</None>
2929
</ItemGroup>
3030

31+
<ItemGroup>
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33+
</ItemGroup>
3134
</Project>

‎Tapeti.DataAnnotations/Tapeti.DataAnnotations.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232
</None>
3333
</ItemGroup>
3434

35+
<ItemGroup>
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
37+
</ItemGroup>
3538
</Project>

‎Tapeti.Flow.SQL/Tapeti.Flow.SQL.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,7 @@
4141
</None>
4242
</ItemGroup>
4343

44+
<ItemGroup>
45+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
46+
</ItemGroup>
4447
</Project>

‎Tapeti.Flow/Tapeti.Flow.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@
2929
</None>
3030
</ItemGroup>
3131

32+
<ItemGroup>
33+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
34+
</ItemGroup>
3235
</Project>

‎Tapeti.Ninject/Tapeti.Ninject.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
</None>
2929
</ItemGroup>
3030

31+
<ItemGroup>
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33+
</ItemGroup>
3134
</Project>

‎Tapeti.Serilog/Tapeti.Serilog.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232
</None>
3333
</ItemGroup>
3434

35+
<ItemGroup>
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
37+
</ItemGroup>
3538
</Project>

‎Tapeti.SimpleInjector/Tapeti.SimpleInjector.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@
3333
</None>
3434
</ItemGroup>
3535

36+
<ItemGroup>
37+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
38+
</ItemGroup>
3639
</Project>

‎Tapeti.Transient/Tapeti.Transient.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
</None>
2929
</ItemGroup>
3030

31+
<ItemGroup>
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33+
</ItemGroup>
3134
</Project>

‎Tapeti.UnityContainer/Tapeti.UnityContainer.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
</None>
2929
</ItemGroup>
3030

31+
<ItemGroup>
32+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
33+
</ItemGroup>
3134
</Project>

‎Tapeti/Config/IMessageContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Tapeti.Config
88
/// <summary>
99
/// Provides information about the message currently being handled.
1010
/// </summary>
11-
public interface IMessageContext : IAsyncDisposable, IDisposable
11+
public interface IMessageContext : IAsyncDisposable
1212
{
1313
/// <summary>
1414
/// Provides access to the Tapeti config.

‎Tapeti/Default/MessageContext.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,21 @@ public bool TryGet<T>(out T payload) where T : IMessageContextPayload
6666
}
6767

6868

69-
/// <inheritdoc />
70-
public void Dispose()
71-
{
72-
foreach (var payload in payloads.Values)
73-
(payload as IDisposable)?.Dispose();
74-
}
75-
76-
7769
/// <inheritdoc />
7870
public async ValueTask DisposeAsync()
7971
{
8072
foreach (var payload in payloads.Values)
8173
{
82-
if (payload is IAsyncDisposable asyncDisposable)
83-
await asyncDisposable.DisposeAsync();
74+
switch (payload)
75+
{
76+
case IAsyncDisposable asyncDisposable:
77+
await asyncDisposable.DisposeAsync();
78+
break;
79+
80+
case IDisposable disposable:
81+
disposable.Dispose();
82+
break;
83+
}
8484
}
8585
}
8686

‎Tapeti/Tapeti.csproj

+3
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@
3636
</None>
3737
</ItemGroup>
3838

39+
<ItemGroup>
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
41+
</ItemGroup>
3942
</Project>

‎appveyor.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ before_build:
1111

1212
after_build:
1313
# Create NuGet packages
14-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti\Tapeti.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
15-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Annotations\Tapeti.Annotations.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
16-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.DataAnnotations\Tapeti.DataAnnotations.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
17-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.DataAnnotations.Extensions\Tapeti.DataAnnotations.Extensions.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
18-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Flow\Tapeti.Flow.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
19-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Flow.SQL\Tapeti.Flow.SQL.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
20-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Transient\Tapeti.Transient.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
21-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Serilog\Tapeti.Serilog.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
22-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.SimpleInjector\Tapeti.SimpleInjector.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
23-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Autofac\Tapeti.Autofac.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
24-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.CastleWindsor\Tapeti.CastleWindsor.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
25-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.Ninject\Tapeti.Ninject.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
26-
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --output output Tapeti.UnityContainer\Tapeti.UnityContainer.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
14+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti\Tapeti.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
15+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Annotations\Tapeti.Annotations.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
16+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.DataAnnotations\Tapeti.DataAnnotations.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
17+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.DataAnnotations.Extensions\Tapeti.DataAnnotations.Extensions.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
18+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Flow\Tapeti.Flow.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
19+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Flow.SQL\Tapeti.Flow.SQL.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
20+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Transient\Tapeti.Transient.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
21+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Serilog\Tapeti.Serilog.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
22+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.SimpleInjector\Tapeti.SimpleInjector.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
23+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Autofac\Tapeti.Autofac.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
24+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.CastleWindsor\Tapeti.CastleWindsor.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
25+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.Ninject\Tapeti.Ninject.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
26+
- cmd: dotnet pack -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:PublishRepositoryUrl=true --output output Tapeti.UnityContainer\Tapeti.UnityContainer.csproj /p:Configuration=Release /p:Version=%GitVersion_NuGetVersion%
2727
# Create Tapeti.Cmd release
2828
- cmd: dotnet publish -c Release -r win-x64 --self-contained=true -o publish\x64\selfcontained Tapeti.Cmd\Tapeti.Cmd.csproj
2929
- cmd: dotnet publish -c Release -r win-x64 --self-contained=false -o publish\x64 Tapeti.Cmd\Tapeti.Cmd.csproj

‎docs/tapeticmd.rst

+15
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,15 @@ Fetches messages from a queue and writes them to disk.
4545
-o <target>, --output <target>
4646
*Required*. Path or filename (depending on the chosen serialization method) where the messages will be output to.
4747

48+
-y, --overwrite
49+
If the output exists, do not ask to overwrite.
50+
4851
-r, --remove
4952
If specified messages are acknowledged and removed from the queue. If not messages are kept.
5053

54+
--skip <count>
55+
Number of messages in the input to skip. Useful if a previous non-removing export was interrupted.
56+
5157
-n <count>, --maxcount <count>
5258
Maximum number of messages to retrieve from the queue. If not specified all messages are exported.
5359

@@ -79,6 +85,12 @@ Read messages from disk as previously exported and publish them to a queue.
7985
-e, --exchange
8086
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.
8187

88+
--skip <count>
89+
Number of messages in the input to skip. Useful if a previous import was interrupted.
90+
91+
-n <count>, --maxcount <count>
92+
Maximum number of messages to import. If not specified all messages are imported.
93+
8294
-s <method>, --serialization <method>
8395
The method used to serialize the message for import or export. Valid options: SingleFileJSON, EasyNetQHosepipe. Defaults to SingleFileJSON. See Serialization methods below for more information.
8496

@@ -115,6 +127,9 @@ Reads messages from a queue and publishes them to another queue, optionally to a
115127
-r, --remove
116128
If specified messages are acknowledged and removed from the queue. If not messages are kept.
117129

130+
--skip <count>
131+
Number of messages in the input to skip. Useful if a previous non-removing shovel was interrupted.
132+
118133
-n <count>, --maxcount <count>
119134
Maximum number of messages to retrieve from the queue. If not specified all messages are exported.
120135

0 commit comments

Comments
 (0)
Please sign in to comment.