This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Location : | |
Hub | |
{ | |
public Task GetLocation(string truckId) | |
{ | |
Task task = null; | |
Bus.Instance.PublishRequestAsync(new GetLocation { TruckId = truckId }, x => | |
{ | |
task = x.Handle(message => {}); | |
x.SetTimeout(30.Seconds()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2011 Chris Patterson, Dru Sellers | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use | |
// this file except in compliance with the License. You may obtain a copy of the | |
// License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software distributed | |
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch origin | |
git checkout develop | |
git rebase origin/develop | |
-- this pulls any commits from the server (origin) to my local repository | |
-- checks out (switches to...) my local develop branch | |
-- aligns my develop branch to the origin/develop branch (cleans up history) | |
If I had an existin feature branch... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Chris Patterson | |
email = [email protected] | |
[core] | |
autocrlf = false | |
[alias] | |
ci = commit | |
undo = reset --hard | |
up = pull origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.*; | |
class MyCallable implements Callable<Integer> | |
{ | |
int limit; | |
public MyCallable(int limit) | |
{ | |
this.limit = limit; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ConsoleApplication12 | |
{ | |
using System; | |
using MassTransit; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Bus.Initialize(sbc => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cleaner_version_of_defining_actor_behavior | |
{ | |
public void Some_method_in_your_code() | |
{ | |
// create the actor instance, passing the state and an initializer | |
// in this case, applying the initial behavior of to the actor | |
ActorRef agent = Actor.New<MyState>(x => x.Apply<DefaultBehavior>()); | |
// now messages can be sent to the actor to make it do things | |
// we will use a stateless actor for that interaction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActor : | |
Actor | |
{ | |
public MyActor(Inbox inbox) | |
{ | |
inbox.Receive<InitMyActor>(initMsg => | |
{ | |
var myActorScopeValue = initMsg.Scope; | |
inbox.Loop(loop => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------------------------------------------------------------------------------------------------------------- | |
Trace URI: msmq://localhost/mt_subscriptions 15 messages | |
------------------------------------------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------------------------------------- | |
Received: c940f977-ff3f-4195-99a5-9f110121ddd9 2011-06-29 05:35:20.614 | |
--------------------------------------------------------------------------------------------------------------------------------------- | |
Message Id: ad32c234-567b-4691-9f2f-314e31498c8a\1067975 | |
Source Address: msmq://localhost/mt_subscriptions?tx=false | |
Input Address: msmq: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using MassTransit; | |
using MassTransitExperimentShared; | |
using System.Threading; | |
namespace MassTransitConsumer | |
{ |