Skip to content

Instantly share code, notes, and snippets.

View phatboyg's full-sized avatar

Chris Patterson phatboyg

View GitHub Profile
@phatboyg
phatboyg / Program.cs
Last active January 28, 2016 23:37
Example code and output to show the exception being thrown and Fault message being published once with MassTransit 2.9.5 and RabbitMQ
namespace Faulty
{
using System;
using MassTransit;
public interface FaultyCommand
{
string Id { get; }
}
@phatboyg
phatboyg / .gitconfig
Last active January 24, 2017 18:45
Latest Git config
[user]
name = Chris Patterson
email = ###
[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = C:/Program Files/KDiff3/KDiff3.exe
[branch]
autosetupmerge = true
[core]
@phatboyg
phatboyg / Program.cs
Created November 5, 2014 23:41
Sample Topshelf service that demonstrates how features can be toggled using the Fooidity Switchyard
namespace ConsoleApplication2
{
using System;
using System.Threading;
using System.Threading.Tasks;
using Autofac;
using Fooidity;
using Topshelf;
@phatboyg
phatboyg / unpackage.sh
Created December 15, 2014 21:26
Destroy any history of packages in the Git repository
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch src/packages" -- --all
@phatboyg
phatboyg / Program.cs
Created December 27, 2014 16:30
Example of the RequestClient usage with MassTransit v3
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using MassTransit;
namespace SimpleConsoleApp
{
internal class Program
{
@phatboyg
phatboyg / InOrderTest.cs
Created February 3, 2015 23:51
In Order Message Test for RabbitMQ
namespace ConsoleApplication3
{
using System;
using MassTransit;
class Program
{
const int limit = 1000;
static int lastIndex = 0;
@phatboyg
phatboyg / Test.cs
Created May 8, 2015 18:29
Failing Test that hangs somewhere in the TPL/blocked... UGH!!
namespace MassTransit.RabbitMqTransport.Tests
{
using System;
using System.Threading.Tasks;
using Configuration;
using NUnit.Framework;
using TestFramework.Messages;
[TestFixture]
# Setting up path...
source dnvm.sh
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/X11/bin:~/bin:"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
if [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
. /usr/local/etc/bash_completion.d/git-completion.bash;
fi
@phatboyg
phatboyg / output.text
Created June 18, 2015 15:45
Performance Testing Handler Count with MT 2.10
08:43:24,973 INFO Configuration Result:
[Success] Name MassTransitStressConsole
[Success] DisplayName MassTransit RabbitMQ Stress Console
[Success] Description Generates a stressful load on RabbitMQ using MassTransit
[Success] ServiceName MassTransitStressConsole
08:43:25,005 INFO Topshelf v3.2.150.0, .NET Framework v4.0.30319.34209
08:43:25,036 INFO RabbitMQ Stress Test (using MassTransit)
08:43:25,036 INFO Host: rabbitmq://localhost/stress_service?prefetch=20
08:43:25,051 INFO Username: guest
08:43:25,051 INFO Password: *****
namespace SagaLockupRepro
{
using System;
using System.Threading;
using Automatonymous;
using MassTransit;
using MassTransit.NLogIntegration;
using MassTransit.RabbitMqTransport;
using MassTransit.Saga;