Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rfleming71/junglequeue
Transactional queuing for AWS SQS
https://github.com/rfleming71/junglequeue
Last synced: 22 days ago
JSON representation
Transactional queuing for AWS SQS
- Host: GitHub
- URL: https://github.com/rfleming71/junglequeue
- Owner: rfleming71
- License: mit
- Created: 2017-08-30T13:00:33.000Z (over 7 years ago)
- Default Branch: development
- Last Pushed: 2017-11-06T19:53:39.000Z (about 7 years ago)
- Last Synced: 2024-05-29T03:34:38.821Z (7 months ago)
- Language: C#
- Homepage:
- Size: 73.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JungleBus
Transactional queue built on top of Amazon Web Services.
[![Build status](https://ci.appveyor.com/api/projects/status/3dxjsva48y40rp2y/branch/development?svg=true)](https://ci.appveyor.com/project/rfleming71/junglequeue/branch/development)# Creating the Queue
Creates a queue that can send and recieve messages
```C#
var queue = QueueBuilder.Create("JungleQueue_Testing", RegionEndpoint.USEast1)
.WithSimpleObjectBuilder()
.UsingJsonSerialization()
.EnableMessageLogging()
.SetSqsPollWaitTime(14)
.UsingEventHandlersFromEntryAssembly()
.WithMaxSimultaneousMessages(1)
.CreateStartableQueue();queue.StartReceiving();
queue.CreateSendQueue().Publish(new TestMessage());
```# Example message handler
```C#
public class Handler2 : IHandleMessage
{
private readonly IQueue _queue;
private readonly ILog _log;
public Handler2(IQueue queue, ILog log)
{
_queue = queue;
_log = log;
}public void Handle(TestMessage message)
{
_log.Info("Starting message Handler 2");
_queue.Send(new TestMessage2());
_log.Info("Finished message Handler 2");
}
}
```## Send Only Queue
Creates a queue that can only send messages
```C#
var queueBuilder = QueueBuilder.Create("JungleQueue_Testing", RegionEndpoint.USEast1)
.WithSimpleObjectBuilder()
.UsingJsonSerialization()
.EnableMessageLogging()
.CreateSendOnlyQueueFactory()
queueBuilder().Send(new TestMessage());
```