Skip to content

Instantly share code, notes, and snippets.

View jlew-cs's full-sized avatar

Jeremy Lew jlew-cs

  • Communispace, Inc
  • Boston, MA
View GitHub Profile
@jlew-cs
jlew-cs / Server Traces
Created February 6, 2014 15:36
SignalR SQL Backplane hang
SignalR.SqlMessageBus Information: 0 : Start installing SignalR SQL objects
SignalR.SqlMessageBus Information: 0 : Start installing SignalR SQL objects
SignalR.SqlMessageBus Information: 0 : SignalR SQL objects installed
SignalR.SqlMessageBus Information: 0 : SignalR SQL objects installed
SignalR.ScaleoutMessageBus Information: 0 : Stream(0) - Changed state from Initial to Open
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : Starting SQL notification listener
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : Starting SQL notification listener
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : SQL notification listener started
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : SQL notification listener started
SignalR.SqlMessageBus Verbose: 0 : Stream 0 : No records received
@jlew-cs
jlew-cs / RedisMessageBus.cs
Last active December 13, 2015 17:19
RedisMessageBus, copied from SignalR 1.0-rc2 and modified to attempt to reconnect when the connection is closed or an error occurs. Initial connection failures will retry until successful. Likewise, when a connection errors or closes unexpectedly after a successful initial connection, it will retry until successful. There is an exponentially-inc…
public class RedisMessageBus : ScaleoutMessageBus
{
private readonly string _server;
private readonly int _port;
private readonly string _password;
private readonly int _db;
private readonly string[] _keys;
private RedisConnection _connection;
private RedisSubscriberConnection _channel;
private Task _connectTask;
@jlew-cs
jlew-cs / ServiceBusEndpoint.cs
Created January 4, 2013 14:59
ServiceHost uses a strategy similar to TopShelf "shelving", where the presence of a directory Foo containing a config file Foo.config will cause an AppDomain to be created named "Foo" that loads that config file and calls an endpoint initialization routine. CAVEAT: We use this *only* in development environments, it has in no way been proven in a…
// This class is actually in a different assembly & namespace fro ServiceHost in my solution,
// you may or may not need that.
namespace ServiceHost
{
public class ServiceBusEndpoint
{
public static void ConfigureNewInstanceForAppDomain()
{
// Call NSB configuration
Configure.With()