Skip to content

Commit

Permalink
remove debug and api warning (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottf authored Jun 23, 2022
1 parent eb6ae13 commit 897eb00
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
14 changes: 0 additions & 14 deletions src/NATS.Client/JetStream/MessageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,14 @@ internal override bool Manage(Msg msg)
{
return false;
}
Console.WriteLine("OMM 0 " + msg);

ulong receivedConsumerSeq = msg.MetaData.ConsumerSequence;
Console.WriteLine("OMM 1 exp " + expectedConsumerSeq + " rcvd " + receivedConsumerSeq);
if (expectedConsumerSeq != receivedConsumerSeq)
{
try
{
expectedConsumerSeq = 1; // consumer always starts with consumer sequence 1

Console.WriteLine("OMM 1-3 |" + Sub + "|");

// 1. shutdown the managers, for instance stops heartbeat timers
MessageManager[] managers = {};
if (Sub is JetStreamAbstractSyncSubscription syncSub)
Expand All @@ -290,19 +286,13 @@ internal override bool Manage(Msg msg)
{
managers = asyncSub.messageManagers;
}
Console.WriteLine("OMM 2 " + managers.Length);

Shutdown(managers);

Console.WriteLine("OMM 3 " + Sub);

// 2. re-subscribe. This means kill the sub then make a new one
// New sub needs a new deliver subject
string newDeliverSubject = Sub.Connection.NewInbox();
Console.WriteLine("OMM 31 ");
Sub.reSubscribe(newDeliverSubject);

Console.WriteLine("OMM 4 ");

// 3. make a new consumer using the same deliver subject but
// with a new starting point
Expand All @@ -313,12 +303,8 @@ internal override bool Manage(Msg msg)
.WithStartTime(DateTime.MinValue) // clear start time in case it was originally set
.Build();

Console.WriteLine("OMM 5 ");

_js.AddOrUpdateConsumerInternal(_stream, userCc);

Console.WriteLine("OMM 6 ");

// 4. re start the managers.
Startup(Sub, managers);
}
Expand Down
4 changes: 0 additions & 4 deletions src/NATS.Client/KeyValue/IKeyValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ public interface IKeyValue

/// <summary>
/// Watch updates for a specific key
/// WARNING: This api requires an internal consumer the enforces ordering of messages.
/// This portion of the implementation is not complete yet. If there was some sort of
/// error from the server and messages were skipped or came out of order the data received
/// would be incomplete. While this is an edge case, it can still technically happen.
/// </summary>
/// <param name="key">the key</param>
/// <param name="watcher">the watcher</param>
Expand Down

0 comments on commit 897eb00

Please sign in to comment.