Skip to content

Commit

Permalink
Reduce max messages and event timing interval
Browse files Browse the repository at this point in the history
  • Loading branch information
urumo committed Nov 23, 2024
1 parent efbf8d4 commit 8b0e2c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Task Initialize(TimeSpan timeout)
public async Task<IList<IBatchContainer>> GetQueueMessagesAsync(int maxCount) =>
await consumer.FetchAsync<string>(new NatsJSFetchOpts
{
MaxMsgs = maxCount,
MaxMsgs = 1, // TODO: for later optimizations change this number
Expires = TimeSpan.FromSeconds(1)
}).Select(natsMsg => natsMsg.ToBatch(serializationManager)).Select(IBatchContainer (dummy) => dummy).ToListAsync();

Expand Down
2 changes: 1 addition & 1 deletion src/Argon.Api/Grains/TestGrain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Task Produce()
var unixEpochNow = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
var payload = new SomeInput(unixEpochNow, "test");
return stream.OnNextAsync(payload, new EventSequenceTokenV2());
}, null, TimeSpan.FromMilliseconds(1_000), TimeSpan.FromMilliseconds(1_000));
}, null, TimeSpan.FromMilliseconds(50), TimeSpan.FromMilliseconds(50));

return Task.CompletedTask;
}
Expand Down

0 comments on commit 8b0e2c9

Please sign in to comment.