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
Created August 8, 2019 15:24
Sample Channel Usage
using System;
using System.Threading.Tasks;
using MassTransit;
namespace ChannelUsage
{
class Program
{
static IBusControl _serverBus;
@phatboyg
phatboyg / ConsoleApp2.csproj
Created February 10, 2019 21:32
Sample showing Azure Service Bus with Lock Timeout
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MassTransit" Version="5.3.1" />
<PackageReference Include="MassTransit.Azure.ServiceBus.Core" Version="5.3.1" />
public class Startup
{
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc();
@phatboyg
phatboyg / Program.cs
Last active January 28, 2019 14:42
Showing that exception works
using System;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Automatonymous;
using MassTransit;
using MassTransit.Saga;
namespace StateMachineTest
{
class Program
@phatboyg
phatboyg / README.md
Last active January 23, 2020 08:27
MassTransit Conductor

Conductor

Conductor is a layer on top of MassTransit for managing, controlling, and monitoring communication between services. Conductor provides a consistent set of capabilities for services and decouples the complexity of routing, failure handling, and monitoring from the service code itself. This allows service visibility and control without requiring services to be modified to apply behaviorial changes related to how those services interact.

Contents

@phatboyg
phatboyg / genesis_public_key
Created February 23, 2018 21:22
genesis_public_key
04c71ebe6e1049cc747f00476a93aef99337d2213b84eff6f0daa8d97fe81bd01b24a80919f8e1fc376ea78f4db6437e361272c52b3f3e8b72b14a575734447fe1
@phatboyg
phatboyg / aaa.md
Last active April 4, 2018 16:57
MassTransit 3 RabbitMQ Message Throughput

The message throughput of MassTransit using RabbitMQ, compared to the "one-way" RPC used in the test published at RestBus.

The send rate of MassTransit doing non-durable messages to RabbitMQ is 8,881 per second The consume rate of those same messages is 8,881 per second.

That's a sustained message throughput over 100,000 messages (5,000 per client thread, the same as the test linked above).

So, to be fair, there is no performance difference between the two in practice.

namespace SagaLockupRepro
{
using System;
using System.Threading;
using Automatonymous;
using MassTransit;
using MassTransit.NLogIntegration;
using MassTransit.RabbitMqTransport;
using MassTransit.Saga;
@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: *****
# 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