Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

Moshine.MessagePipeline

Asynchronous Azure ServiceBus/ Amazon SQS message processing

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

Moshine.MessagePipeline

Perform asynchronous actions

Declare a service



SomeService = public class
public
	method SomeMethod;
	begin
	  Console.WriteLine('Somemethod')
	end;
end;

end.

Queue up the method invocation for later processing in a controlled manner using a Queue.



      var bus := new AmazonSQSBus (..);
      or
      var bus := new ServiceBus(...);
      
      var cache:ICache := new InMemoryCache;
      var pipe := new Pipeline(cache, bus);

      pipe.TraceCallback := method(message:String) begin
        Console.WriteLine('trace '+message);
      end;

      pipe.ErrorCallback := method(e:Exception) begin
        Console.writeLine('Exception '+e.Message);
      end;

      pipe.Start;

      var pipelineResponse:=pipe.Send(s -> s.SomeMethodWithObject);
      var obj:Object:=pipelineResponse.WaitForResult(cache);

Developed in Oxygene for .Net using Azure ServiceBus or Amazon SQS. Support for hosting in AWS Lambdas.