Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
vinhch committed Jul 1, 2017
2 parents e4baf23 + 167f792 commit dc976c3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
13 changes: 3 additions & 10 deletions MessageQueueDemo.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.13
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9F74D311-DB70-4FA4-AE64-4FF6BAFB95A4}"
EndProject
Expand All @@ -15,11 +15,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CHV.Infrastructure.MessageB
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CHV.Infrastructure.MessageBus.RabbitMq", "src\CHV.Infrastructure.MessageBus.RabbitMq\CHV.Infrastructure.MessageBus.RabbitMq.csproj", "{57F97F8E-C909-47E7-8E60-9E2E3341E76A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MessageQueueDemo", "src\MessageQueueDemo\MessageQueueDemo.csproj", "{81CAB4A1-643D-42E4-B6CA-51BB4794C6EC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RabbitMq.SubscriberConsoleTests", "test\RabbitMq.SubscriberConsoleTests\RabbitMq.SubscriberConsoleTests.csproj", "{340FA942-A9F1-4B1B-8FD9-56D70E4DF5A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RabbitMq.SubscriberConsoleTests", "test\RabbitMq.SubscriberConsoleTests\RabbitMq.SubscriberConsoleTests.csproj", "{340FA942-A9F1-4B1B-8FD9-56D70E4DF5A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RabbitMq.PublisherConsoleTests", "test\RabbitMq.PublisherConsoleTests\RabbitMq.PublisherConsoleTests.csproj", "{89A30230-89F8-45B3-9252-12FD884C7D48}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RabbitMq.PublisherConsoleTests", "test\RabbitMq.PublisherConsoleTests\RabbitMq.PublisherConsoleTests.csproj", "{89A30230-89F8-45B3-9252-12FD884C7D48}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -43,10 +41,6 @@ Global
{57F97F8E-C909-47E7-8E60-9E2E3341E76A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57F97F8E-C909-47E7-8E60-9E2E3341E76A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57F97F8E-C909-47E7-8E60-9E2E3341E76A}.Release|Any CPU.Build.0 = Release|Any CPU
{81CAB4A1-643D-42E4-B6CA-51BB4794C6EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{81CAB4A1-643D-42E4-B6CA-51BB4794C6EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{81CAB4A1-643D-42E4-B6CA-51BB4794C6EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{81CAB4A1-643D-42E4-B6CA-51BB4794C6EC}.Release|Any CPU.Build.0 = Release|Any CPU
{340FA942-A9F1-4B1B-8FD9-56D70E4DF5A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{340FA942-A9F1-4B1B-8FD9-56D70E4DF5A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{340FA942-A9F1-4B1B-8FD9-56D70E4DF5A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -64,7 +58,6 @@ Global
{5A71E5B4-913C-4F7D-AA67-E61D3F549A17} = {9F74D311-DB70-4FA4-AE64-4FF6BAFB95A4}
{0FEF98B9-0141-47D2-B00C-166EFD611280} = {9F74D311-DB70-4FA4-AE64-4FF6BAFB95A4}
{57F97F8E-C909-47E7-8E60-9E2E3341E76A} = {9F74D311-DB70-4FA4-AE64-4FF6BAFB95A4}
{81CAB4A1-643D-42E4-B6CA-51BB4794C6EC} = {9F74D311-DB70-4FA4-AE64-4FF6BAFB95A4}
{340FA942-A9F1-4B1B-8FD9-56D70E4DF5A9} = {87399E30-9721-4E12-AFCC-9530E4980FAC}
{89A30230-89F8-45B3-9252-12FD884C7D48} = {87399E30-9721-4E12-AFCC-9530E4980FAC}
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Newtonsoft.Json;
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using System.Reactive;
using System.Reactive.Linq;
Expand All @@ -16,6 +15,9 @@ public PubSubClientBus(string uri, string exchangeName = "", string exchangeType
{
}

/*
* Publish & Request need routingKey and exchangeName
*/
public IObservable<Unit> Publish<TMessage>(TMessage message)
{
return Observable.Start(() =>
Expand All @@ -26,6 +28,9 @@ public IObservable<Unit> Publish<TMessage>(TMessage message)
});
}

/*
* Subscribe & Respond need queueName
*/
public IObservable<Unit> Subscribe<TMessage>(Func<TMessage, Task> subscribeHandler)
{
return Observable.Start(() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ protected override void CreateConsumer()
}

/*
* ~Publish
* Publish & Request need routingKey and exchangeName
*
* Note: The client needs to create its consumer before publishing the request
* (otherwise the broker can't substitute reply_to correctly,
* and you see that ChannelClose exception as the result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public RespondClientBus(string uri, string exchangeName = "", string exchangeTyp
}

/*
* ~Subscribe
* Subscribe & Respond need queueName
*/
public async Task RespondAsync<TRequest, TResponse>(Func<TRequest, Task<TResponse>> respondHandler)
{
Expand Down
7 changes: 0 additions & 7 deletions src/MessageQueueDemo/MessageQueueDemo.csproj

This file was deleted.

0 comments on commit dc976c3

Please sign in to comment.