Skip to content

Instantly share code, notes, and snippets.

View AntonSmolkov's full-sized avatar

Anton Smolkov AntonSmolkov

View GitHub Profile
echo '{"mydummy": "json"}' | gzip | curl -i --data-binary @- -H "Content-Encoding: gzip" http://localhost:8041
@AntonSmolkov
AntonSmolkov / gist:10a10cb1749d16418f71419f31cc6209
Created July 12, 2021 11:02
vector.dev fluent source issue log
Jul 12 13:25:14.930 DEBUG source{component_kind="source" component_name=fluent_source component_type=fluent}:connection{peer_addr=x.x.x.x}: vector::sources::util::tcp: Connection closed.
Jul 12 13:25:15.069 DEBUG source{component_kind="source" component_name=fluent_source component_type=fluent}:connection{peer_addr=x.x.x.x}: vector::sources::util::tcp: Connection closed.
Jul 12 13:25:15.074 DEBUG source{component_kind="source" component_name=fluent_source component_type=fluent}:connection{peer_addr=x.x.x.x}: vector::sources::util::tcp: Connection closed.
Jul 12 13:25:15.076 DEBUG source{component_kind="source" component_name=fluent_source component_type=fluent}:connection{peer_addr=x.x.x.x}: vector::sources::util::tcp: Connection closed.
Jul 12 13:25:15.136 TRACE source{component_kind="source" component_name=fluent_source component_type=fluent}:connection{peer_addr=x.x.x.x}: vector::internal_events::fluent: Received fluent message. byte_size=1350
Jul 12 13:25:15.136 TRACE source{component_kind="source" compon
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Threading.Channels;
var lockObject = new object();
var blockingCollection = new BlockingCollection<int>(10);
var channel = Channel.CreateBounded<int>(new BoundedChannelOptions(10) {SingleReader = true});
var cts = new CancellationTokenSource();
cts.CancelAfter(30000);
@AntonSmolkov
AntonSmolkov / CoreNatsPublisher.cs
Last active June 17, 2024 15:31
NATS JetStreams partitions publishing code
using NATS.Client.Core;
using NATS.Client.JetStream;
namespace Zyfra.Udl.Tools.NatsPerfTester.Producer.Publishers;
public class CoreNatsPublisher(INatsConnection connection) : INatsPublisher
{
public ValueTask PublishAsync<T>(
string subject,
T? data,