Skip to content

Demonstration end-to-end examples for the MicroService.Harness repository.

Notifications You must be signed in to change notification settings

JayJayson84/MicroService.Harness.Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example .Net Core MicroService Demo

This demo contains the following end-to-end examples for the MicroService.Harness.

  • WebPage integration for the Producer API.
  • WPF desktop application for the Consumer.

Getting started

  1. Clone the repository.
  2. Edit Webpage/microservice-api.html.
  3. Update the API url on line 148 with the Protocol, IP Address and Port configured in the MicroService.Harness ReadMe.
  4. Open MassTransit.Message.Broker/MassTransit.Message.Broker.sln in Visual Studio.
  5. Edit C:\git\MicroService.Harness.Demo\MassTransit.Message.Broker\Resources\Settings\Connection.resx.
  6. Update the HostName value with the IP Address for the eth0 adapter of your WSL Ubuntu host, installed during the MicroService.Harness ReadMe. (Run ifconfig in the bash terminal to get the IP).
  7. Update the Password with the unencrypted Broker password configured in the Generate RabbitMQ password hashes section of the MicroService.Harness ReadMe.

Important

The credentials are intended for local development only. Take care to avoid committing passwords into public and/or shared repositories and follow recommended practices for securely implementing a password store in a real world application.

WebPage Usage

  1. Open Webpage/microservice-api.html in your browser.
  2. Fill in and submit the form.
  3. A POST request will be sent to the producer API and the response written to the page.

WPF Usage

  1. Open MassTransit.Message.Broker/MassTransit.Message.Broker.sln in Visual Studio.
  2. Debug the startup project.
  3. Fill in the form in the side panel.
  4. Click one of the submission methods below the form in the side panel.
  5. A request will be sent to the consumer and the payload and response written to the text boxes on the page.
  6. You can see the different ways of sending a request by opening MassTransit.Message.Broker\ViewModels\MainWindowViewModel.cs and looking at the methods in the Private Methods region.

Note

The Publish and Send methods do not subscribe to the exchange for a response and can be debugged by adding breakpoints to the consumer in the MicroService.Harness. The Send/Receive methods do subscribe and the response will include the result from the service.

About

Demonstration end-to-end examples for the MicroService.Harness repository.

Resources

Stars

Watchers

Forks

Packages

No packages published