Mert Özen Go Beyond the Code

Blog

Posts and series that take software and IT from the basics to advanced topics: from programming languages and databases to architecture and AI.

Series
1990 posts found
Kafka in .NET with Confluent.Kafka: Producers, Consumer Groups, Offset Commits and Rebalancing
Backend PART 05

Kafka in .NET with Confluent.Kafka: Producers, Consumer Groups, Offset Commits and Rebalancing

Keep the producer a singleton, use the key for ordering, Acks=All and idempotence, and Flush before dispose; in the consumer set EnableAutoOffsetStore=false, call StoreOffset after processing and write poison messages to a dead-letter topic. Real output: default auto commit skipping a half-processed message, duplicates after kill -9, eager rebalance, KIP-848 and consumer lag.

8 Nov 2026 12 min 68
Azure Service Bus .NET SDK: Queues, Topics/Subscriptions, Sessions and ServiceBusProcessor
Backend PART 04

Azure Service Bus .NET SDK: Queues, Topics/Subscriptions, Sessions and ServiceBusProcessor

Register ServiceBusClient as a singleton with AddAzureClients, use managed identity instead of a connection string in Azure, run ServiceBusProcessor with AutoCompleteMessages=false and lock renewal, and use sessions for ordered work. Real emulator output: lock loss, three attempts hitting the DLQ in one second, filters, sessions, scheduled messages and duplicate detection.

8 Nov 2026 11 min 61
RabbitMQ Topology in Code: Exchange Types, Bindings, Quorum Queues and Streams
Backend PART 03

RabbitMQ Topology in Code: Exchange Types, Bindings, Quorum Queues and Streams

Use quorum queues and topic exchanges for durable business messages, declare the topology idempotently at startup, and leave limits that may change (TTL, max-length, delivery-limit, DLX) to a policy instead of queue arguments. Real output: nine copies from four routing keys, a PRECONDITION_FAILED error, fanout cache invalidation, stream replay and reject-publish.

8 Nov 2026 11 min 56
First Producer and Consumer with RabbitMQ.Client 7: Async API, Connection/Channel Lifecycle and Manual Ack
Backend PART 02

First Producer and Consumer with RabbitMQ.Client 7: Async API, Connection/Channel Lifecycle and Manual Ack

Keep one IConnection for the application's lifetime, never share an IChannel across threads, verify publishes with publisher confirmations and mandatory, and run the consumer inside a BackgroundService with autoAck=false and prefetch. Real output shows a prefetch-less consumer pulling 498 messages into memory, autoAck losing 17 messages, automatic recovery and graceful shutdown.

8 Nov 2026 13 min 74
Getting Started with Message Queues in .NET: RabbitMQ, Azure Service Bus and Kafka Clients, Which One When
Backend PART 01

Getting Started with Message Queues in .NET: RabbitMQ, Azure Service Bus and Kafka Clients, Which One When

RabbitMQ for flexible routing and per-message ack/retry, Azure Service Bus for a managed service on Azure, Kafka for high volume and replay; the series starts with raw clients and moves on to abstractions. The three brokers' models, a practical comparison table, a program sending and reading the same OrderPlaced with three clients, the Docker Compose environment and a note on Amazon SQS/SNS.

8 Nov 2026 11 min 62
What's New in Real-time from .NET 8 to .NET 11: Stateful Reconnect, Native AOT, SSE and SignalR Authentication Refresh
Backend PART 09

What's New in Real-time from .NET 8 to .NET 11: Stateful Reconnect, Native AOT, SSE and SignalR Authentication Refresh

.NET 8 brought stateful reconnect, .NET 9 polymorphic hub parameters, an ActivitySource and Native AOT for SignalR, .NET 10 TypedResults.ServerSentEvents, and .NET 11 adds authentication refresh that renews the token without dropping the connection. A 28 MB vs 82 MB AOT measurement, the strongly typed hub AOT warning, cancellable hub calls, SSE in OpenAPI 3.2 and legacy ASP.NET SignalR.

8 Nov 2026 11 min 73
Scaling Out and Running SignalR in Production: Sticky Sessions, Redis Backplane, Azure SignalR Service and Monitoring
Backend PART 08

Scaling Out and Running SignalR in Production: Sticky Sessions, Redis Backplane, Azure SignalR Service and Monitoring

SignalR on multiple servers needs two things: sticky sessions that keep negotiate and the connection on the same server, and a backplane that carries messages between servers. Real error messages with Nginx, the skipNegotiation exception, the Redis backplane and its channel prefix, messages lost during a Redis outage, Azure SignalR Service, and SignalR metrics and tracing.

8 Nov 2026 11 min 103
Resilience in SignalR: Automatic Reconnect, Stateful Reconnect, Streaming and MessagePack
Backend PART 07

Resilience in SignalR: Automatic Reconnect, Stateful Reconnect, Streaming and MessagePack

Stateful reconnect prevents message loss only on short drops that recover instantly; an outage of a few seconds still means a new connection and lost messages. A retry policy with jitter, rebuilding groups in onreconnected, server and client streaming with IAsyncEnumerable, cancellation, MessagePack's byte savings and its PascalCase and date traps, and limits for slow clients.

8 Nov 2026 10 min 82
Authentication, Authorization and Security in SignalR: JWT, the access_token Query String and Hub Method Policies
Backend PART 06

Authentication, Authorization and Security in SignalR: JWT, the access_token Query String and Hub Method Policies

SignalR authenticates a user once, when connecting; by default the connection stays open even after the token expires or a role changes. access_token via OnMessageReceived, tokens leaking into logs, accessTokenFactory, hub and method policies, resource-based checks with HubInvocationContext, rate limiting with IHubFilter, message size, Origin, and CloseOnAuthenticationExpiration.

8 Nov 2026 11 min 79
Users, Groups and Connection Lifecycle in SignalR: Sending Messages from Anywhere with IHubContext
Backend PART 05

Users, Groups and Connection Lifecycle in SignalR: Sending Messages from Anywhere with IHubContext

Clients.User reaches all of a user's tabs, while group membership belongs to the connection and is lost on reconnect. IUserIdProvider, Caller/Others/OthersInGroup, the unexpected ordering of OnConnectedAsync and OnDisconnectedAsync, counter-based presence in Redis, and sending notifications from an endpoint, a BackgroundService and a consumer with IHubContext.

8 Nov 2026 10 min 57
Getting Started with ASP.NET Core SignalR: Hubs, Strongly Typed Hubs and Connecting from Angular with @microsoft/signalr
Backend PART 04

Getting Started with ASP.NET Core SignalR: Hubs, Strongly Typed Hubs and Connecting from Angular with @microsoft/signalr

A SignalR hub is a transient handler created for every call; it holds no state and reports user-facing errors with HubException. AddSignalR and MapHub, type-safe calls with Hub<IClient>, transport negotiation, encapsulating the HubConnection in an Angular service that publishes signals, and AllowCredentials with an explicit origin list.

8 Nov 2026 11 min 78
Server-Sent Events in Depth: TypedResults.ServerSentEvents, Resuming with Last-Event-ID and Proxy Pitfalls
Backend PART 03

Server-Sent Events in Depth: TypedResults.ServerSentEvents, Resuming with Last-Event-ID and Proxy Pitfalls

To make up for missed SSE events, give every event an EventId, resend everything after the Last-Event-ID header and send a heartbeat as soon as the client connects. SseItem<T>, retry, CancellationToken, the Nginx gzip and timeout traps, HTTP/1.1's 6-connection limit, wrapping EventSource in an Observable in Angular, and reading with fetch when you need headers.

8 Nov 2026 14 min 82
Blog Map