All Projects β†’ houseofcat β†’ Cookedrabbit

houseofcat / Cookedrabbit

Licence: mit
CookedRabbit is a simple service based RabbitMQ wrapper for dealing with channels/connections.

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Cookedrabbit

DotNetDynamicInjector
πŸ’‰ Dynamically reference external dlls without the need to add them to the project. Leave your project with low dependency and allowing specific dlls according to your business rule or database parameters.
Stars: ✭ 18 (-35.71%)
Mutual labels:  netcore, net
H.NotifyIcon.WPF
NotifyIcon for .Net Core 3.1 and .Net 5 WPF.
Stars: ✭ 44 (+57.14%)
Mutual labels:  netcore, net
ormdb
ORM tool for .Net / .Net.Core
Stars: ✭ 14 (-50%)
Mutual labels:  netcore, net
Norm.net
High performance micro-ORM modern Dapper replacement for .NET Standard 2.1 and higher
Stars: ✭ 92 (+228.57%)
Mutual labels:  netcore, net
Bcrypt.net
BCrypt.Net - Bringing updates to the original bcrypt package
Stars: ✭ 422 (+1407.14%)
Mutual labels:  netcore, net
NETProvider
Firebird ADO.NET Data Provider
Stars: ✭ 113 (+303.57%)
Mutual labels:  netcore, net
Tesseract
A set of libraries for rapidly developing Pipeline driven micro/macroservices.
Stars: ✭ 20 (-28.57%)
Mutual labels:  rabbitmq, netcore
Library
A microservice project using .NET Core 2.0, DDD, CQRS, Event Sourcing, Redis and RabbitMQ
Stars: ✭ 122 (+335.71%)
Mutual labels:  rabbitmq, netcore
Dbreeze
C# .NET MONO NOSQL ( key value store embedded ) ACID multi-paradigm database management system.
Stars: ✭ 383 (+1267.86%)
Mutual labels:  netcore, net
Meiam.system
.NET 5 / .NET Core 3.1 WebAPI + Vue 2.0 + RBAC δΌδΈšηΊ§ε‰εŽη«―εˆ†η¦»ζƒι™ζ‘†ζžΆ
Stars: ✭ 340 (+1114.29%)
Mutual labels:  rabbitmq, netcore
MQTTnet
MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
Stars: ✭ 3,309 (+11717.86%)
Mutual labels:  netcore, net
Epplus
EPPlus 5-Excel spreadsheets for .NET
Stars: ✭ 693 (+2375%)
Mutual labels:  netcore, net
aliyun-openapi-sdk-net-core
aliyun open api sdk for .net core 2.0
Stars: ✭ 17 (-39.29%)
Mutual labels:  netcore, net
live-documenter
.NET documentation generator and live reader. Generate documentation from .NET code and xml comments, fast, quick and easy.
Stars: ✭ 64 (+128.57%)
Mutual labels:  netcore, net
Cqrs Clean Eventual Consistency
CQRS, using Clean Architecture, multiple databases and Eventual Consistency
Stars: ✭ 247 (+782.14%)
Mutual labels:  rabbitmq, netcore
Sharer
Arduino & .NET serial communication library to read/write variables and remote call functions using the Sharer protocol. Works on Windows, Linux and MacOS.
Stars: ✭ 21 (-25%)
Mutual labels:  netcore, net
Winton.extensions.configuration.consul
Enables Consul to be used as a configuration source in dotnet core applications
Stars: ✭ 239 (+753.57%)
Mutual labels:  netcore, net
Dotnetcore Microservices Poc
Very simplified insurance sales system made in a microservices architecture using .NET Core
Stars: ✭ 1,304 (+4557.14%)
Mutual labels:  rabbitmq, netcore
csharp-ddd-skeleton
🦈✨ C# DDD Skeleton: Bootstrap your new C# projects applying Hexagonal Architecture and Domain-Driven Design patterns
Stars: ✭ 67 (+139.29%)
Mutual labels:  rabbitmq, netcore
Zkweb
A flexible web framework supports .Net Framework and .Net Core
Stars: ✭ 475 (+1596.43%)
Mutual labels:  netcore, net

CookedRabbit AppVeyor

.NET 4.7.2

NuGet NuGet

NOTICE! COOKEDRABBIT.CORE (NETCORE) DEVELOPMENT HAS MOVED TO HERE!

https://github.com/houseofcat/RabbitMQ.Core

Performance Updates v1.0.3 -> 1.0.4 on Visual Studio 2019 Enterprise

Click to show!


Program running (v1.0.3).  
Profiling...  
2019-04-05 05:44:14.754: Creating RabbitChannelPool and RabbitServices...  
2019-04-05 05:44:14.925: Creating RabbitChannelPool and RabbitServices finished. Time: 170 ms  
2019-04-05 05:44:14.925: Creating test data...  
2019-04-05 05:44:15.129: Creating test data finished. Time: 203 ms  
2019-04-05 05:44:15.129: Creating and/or Purging benchmark queues...  
2019-04-05 05:44:15.224: Creating and/or Purging finished. Time: 94 ms  
2019-04-05 05:44:15.224: Publish test starting...  
2019-04-05 05:44:23.862: Publish finished. Time: 8637 ms  
2019-04-05 05:44:23.862: Publish rate 11578.094 msg/s
2019-04-05 05:44:23.862: Purging benchmark queues...  
2019-04-05 05:44:24.061: Purging finished. Time: 198 ms  
2019-04-05 05:44:24.061: Shutting down/disposing of services...
2019-04-05 05:44:24.095: Shutting down/disposing of services finished. Time: 33 ms

Program running (v1.0.4).  
Profiling...
2019-04-05 19:55:26.275: Creating RabbitChannelPool and RabbitServices...
2019-04-05 19:55:26.412: Creating RabbitChannelPool and RabbitServices finished. Time: 135 ms
2019-04-05 19:55:26.412: Creating test data...
2019-04-05 19:55:26.603: Creating test data finished. Time: 190 ms
2019-04-05 19:55:26.603: Creating and/or Purging benchmark queues...
2019-04-05 19:55:26.622: Creating and/or Purging finished. Time: 18 ms
2019-04-05 19:55:26.622: Publish test starting...
2019-04-05 19:55:27.273: Publish finished. Time: 651 ms
2019-04-05 19:55:27.273: Publish rate 153609.831 msg/s
2019-04-05 19:55:27.274: Purging benchmark queues...
2019-04-05 19:55:27.718: Purging finished. Time: 444 ms
2019-04-05 19:55:27.718: Shutting down/disposing of services...
2019-04-05 19:55:27.754: Shutting down/disposing of services finished. Time: 35 ms

About 1226.7% increase of performance or back in line with previous benchmarks.

Welcome!

About CookedRabbit

CookedRabbit is a simple RabbitMQ wrapper for dealing with channels and connection headaches. It also shows you the natural evolution to common everyday problems with RabbitMQ implementations and how to avoid them. This solution is more orientated to services.

This is RabbitMQ as a Service with lightweight dazzle : RaaS L dazzle

The Demo client begins with examples that you should avoid and slowly progresses to more advanced concepts. The biggest problem I have observed so far is the storing of IModels (RabbitMQ object that represents channels) in containers/collections. This makes code very prone to memory leaks. After observing it countless times, I thought it would make a great candidate for abstraction. The examples are supposed to be simplistic.

This library is not supposed to be rocket science. It should demonstrate simplification, removal, and abstraction of common usage code when wrapping RabbitMQ DotNetClient. It continues to add functionality with simplification at the same time. I recommend getting started with the CookedRabbit wiki examples.

Inspired by the likes of RawRabbit (https://github.com/pardahlman/RawRabbit), I needed a simpler RabbitMQ solution at times for specific situations. The longterm goal is to be modern, lightweight, and KISS. If you need a more thorough/advanced solution, I highly recommend checking out aforementioned RawRabbit or another popular solution: EastyNetQ.

For more details and code examples, visit the Wiki!

Why use CookedRabbit?

Click to show!

I personally would use CookedRabbit because it is simple. Once you are setup with a ChannelPool, you are ready to just Publish and/or Get through a service or RabbitBurrow if you prefer. Obviously it's capable of more but it is entirely optional. One bonus advantage to CookedRabbit is that I will stay current with .Net Framework, NetCore, C#7.x+, and the RabbitMQ client. It is not my intention to let things lag behind Pivotal RabbitMQ or Microsoft releases.

  • CookedRabbit is in active development.
  • CookedRabbit supports SSL/TLS.
  • CookedRabbit supports Gzip, Deflate, and LZ4 compression.
  • CookedRabbit supports Utf8Json, ZeroFormat, and JSON string serialization.
  • CookedRabbit provides async/await around RabbitMQ calls.
  • CookedRabbit is Dependency Injection friendly.
  • CookedRabbit services support an optional ILogger from Microsoft.Extensions.Logger.
  • CookedRabbit supports logic based customizations.
  • CookedRabbit has fairly decent commenting and Wiki being filled out.
  • CookedRabbit has a plethora of examples on how to use in the Demo project, Tests project, and Benchmark project.

Last words on this library: it is far from perfect. I am always trying to improve performance but maintain scalability. An overclocker will readily tell you something is always the bottleneck but I tried to blend the software ones as much as possible. Occasionally, you will see something that doesn't quite look like best practices. I am always willing to change and learn - but in some cases, best practices don't work the fastest.

With that being said, here is some sample performance!

Test Setup

i7 8700K @ 4.7 GHz, Samsung Evo Pro 600 512 GB m2 NVMe
100,000 messages (1KB each.) Distributed over 10 queues and a 10 connection/30 channel pool.
RabbitMQ Server v3.7.8 (localhost)
Erlang v21.1
NetCore v2.0.4 / x64 / Release
0 Errors/0 Lost

RabbitMQ 5.10+ - BasicBatch

Summary: Recently added by Pivotal .NET team. Looks like a good performer but believe the library has an unusally long delay getting to the server. The results took an additional second or two to show up server side (validation counts), which means it is probably queued up client side somewhat.
Channel: Uses one channel and some client side buffer.

That means these benchmark numbers are the rate of sending to the client side library queue buffer - not 100% to the actual server.

RabbitMQ 5.10+ - BasicBatch (with async Task Wrapper)

Summary: Not a major performance hit from wrapping in a Task.Run, which is good and allows it to be called asynchronously.
Channel: Uses one channel and some client side buffer.

PublishInParallel - Multi (Concurrent)

Summary: Not designed to be ran concurrently with others as it uses a channel per publish make this heavy on network connectivity between Server and RabbitMQ node. Use this when connection pools are large and network conditions are stellar.
Channel Usage: Psychotic.

PublishInParallel - Single

Summary: Same as above but only one method is used to publish 100,000 messages. Subject to IConnectionPool overhead.
Channel Usage: 100%.

PublishMany - Single Async

Summary: Same as above, one method publishes all messages using asynchronous flow.
Channel Usage: Only 1.

PublishMany - Single

Summary: Same as above, one method publishes all messages using synchronous flow.
Channel Usage: Only 1.

PublishMany - Multi

Summary: 10 PublishMany single methods fired sequentially.
Channel Usage: Only 1 at a time, new channel at the start of each method.

PublishMany - Multi Async/Concurrent

Summary: 10 PublishMany single methods fired async/concurrently.
Channel Usage: 10 channels engaged at the same time.

Getting Started

Click to show!

Configuring RabbitMQ Server First (if running Local)

To run .Demo locally, have Erlang 20.3 and Server RabbitMQ v3.7.x installed locally and running first.
Use the HTTP API management from RabbitMQ to verify communication is occurring.
The Demo project calls WarmupAsync() will create the queue '001' to work with, if it doesn't exist, and send/receive a test messages.

Developed/Tested Against

  • Erlang 20.3 (pre-9/29/2018)
  • Erlang 21.1 (post-9/29/2018)
  • Erlang 21.3 (post-4/5/2019)
  • RabbitMQ Server v3.7.5 (pre-7/6/2018)
  • RabbitMQ Server v3.7.7 (pre-9/29/2018)
  • RabbitMQ Server v3.7.8 (post-9/29/2018)
  • RabbitMQ Server v3.7.14 (post-4/5/2019)

Configuration Values

Checkout the RabbitSeasoning to configure your RabbitService/RabbitTopologyService.

NetFramework Requirements

Click to show!

  • Visual Studio 2017+ installed (Community+).
  • .NET 4.7.2 SDK installed.
  • Compile as C# 7.2+ minimum.

NetCore Requirements

Click to show!

  • Visual Studio Code or Visual Studio 2017+ installed.
  • Open Folder NetCore or open the SLN.
  • Compile as C# 7.2+ minimum.
  • NetCore 2.1.0 SDK installed.

Note: (NetCore runtime 2.1.1 seems buggy at this time)

Documentation

Click to show!

  • Visit the Wiki!
    • Check out the changelog for detailed changes made via commit.
    • Check out the Library Documentation for class/variable/service descriptions and comments.
    • Check out the Library Tutorial section for basic how-tos.

Upcoming Features

Click to show!

  • Adding a built-in Polly Plugin implementation.
  • Custom Connection model with EventListener wireups.
  • Disaster recovery & circuit break.
  • A ServiceBus-esque client.
  • Additional Demonstrations.

Service Topology At A Glance

Click to show ASCII Art!

    β•‘
    β•‘ Your Business Logic
    β•‘
    ╠══ Β» RabbbitBurrow ════════════════════════════════════════════════════════════╗
    β•‘       β•‘                                                                       β•‘
    β•‘       β•‘ & RabbitSerializeService : RabbitDeliveryService                      β•‘
    β•‘       β•‘ & RabbitMaintenanceService : RabbitTopologyService                    β•‘
    β•‘       β•‘ - Circuit Breaker                                                     β•‘
    β•‘       β•‘ - Abstraction                                                         β•‘
    β•‘       β•‘                                                                       β•‘
    ╠════ Β» ╠══ Β» RabbitDeliveryService : IRabbitDeliveryService ═══════════════════╣
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•‘ & RabbitChannelPool                                           β•‘
    β•‘       β•‘       β•‘ & RabbitSeasoning                                             β•‘
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•‘ + Flag Channel As Dead                                        β•‘
    β•‘       β•‘       β•‘ + Return Channel To Pool (Finished Work)                      β•‘
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•‘ + Publish                                                     β•‘
    β•‘       β•‘       β•‘ + PublishMany                                                 β•‘
    β•‘       β•‘       β•‘ + PublishManyAsBatches                                        β•‘
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•‘ + Get                                                         β•‘
    β•‘       β•‘       β•‘   + Returns As ValueTuple                                     β•‘
    β•‘       β•‘       β•‘   + Returns As AckableResult                                  β•‘
    β•‘       β•‘       β•‘ + GetMany                                                     β•‘
    β•‘       β•‘       β•‘   + Returns As ValueTuple                                     β•‘
    β•‘       β•‘       β•‘   + Returns As AckableResult                                  β•‘
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•‘ + CreateConsumerAsync                                         β•‘
    β•‘       β•‘       β•‘ + CreateAsyncConsumerAsync                                    β•‘
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•‘ Customize:                                                    β•‘
    β•‘       β•‘       β•‘ + Use ILogger                                                 β•‘
    β•‘       β•‘       β•‘ + throw ex                                                    β•‘
    β•‘       β•‘       β•‘ + Throttling                                                  β•‘
    β•‘       β•‘       β•‘                                                               β•‘
    β•‘       β•‘       β•šβ•β• Β» RabbitChannelPool : IRabbitChannelPool ═══════════════════╣
    β•‘       β•‘               β•‘                                                       β•‘
    β•‘       β•‘               β•‘ & RabbitConnectionPool                                β•‘
    β•‘       β•‘               β•‘ & RabbitSeasoning                                     β•‘
    β•‘       β•‘               β•‘                                                       β•‘
    β•‘       β•‘               β•‘ + GetTransientChannel (non-Ackable)                   β•‘
    β•‘       β•‘               β•‘ + GetTransientChannel (Ackable)                       β•‘
    β•‘       β•‘               β•‘                                                       β•‘
    β•‘       β•‘               β•‘ + GetChannelPair from &ChannelPool (non-Ackable)      β•‘
    β•‘       β•‘               β•‘ + GetChannelPair from &ChannelPool (ackable)          β•‘
    β•‘       β•‘               β•‘                                                       β•‘
    β•‘       β•‘               β•‘ Mechanisms:                                           β•‘
    β•‘       β•‘               β•‘ + Get Channel Delay (When All Channels Are In Use)    β•‘
    β•‘       β•‘               β•‘ + In Use ChannelPair Pool                             β•‘
    β•‘       β•‘               β•‘ + In Use Ack ChannelPair Pool                         β•‘
    β•‘       β•‘               β•‘ + Return Channel to A Pool                            β•‘
    β•‘       β•‘               β•‘                                                       β•‘
    β•‘       β•‘               β•‘ Customize:                                            β•‘
    β•‘       β•‘               β•‘ - Use ILogger                                         β•‘
    β•‘       β•‘               β•‘ - throw ex                                            β•‘
    β•‘       β•‘               β•‘                                                       β•‘
    β•‘       β•‘               β•šβ•β• Β» RabbitConnectionPool : IRabbitConnectionPool ═════╣
    β•‘       β•‘                       β•‘                                               β•‘
    β•‘       β•‘                       β•‘ & RabbitMQ ConnectionFactory                  β•‘
    β•‘       β•‘                       β•‘ & RabbitSeasoning                             β•‘
    β•‘       β•‘                       β•‘ & ConnectionPool                              β•‘
    β•‘       β•‘                       β•‘                                               β•‘
    β•‘       β•‘                       β•‘ Customize:                                    β•‘
    β•‘       β•‘                       β•‘ - Use ILogger                                 β•‘
    β•‘       β•‘                       β•‘ - throw ex                                    β•‘
    β•‘       β•‘                       β•‘ - System for Dealing with Flagged Connections β•‘
    β•‘       β•‘                       β•‘                                               β•‘
    β•‘       β•‘                       β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•£
    β•‘       β•‘                                                                       β•‘
    β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

To be continued on the wiki!

Legend

& Indicates mandatory/crucial internal object.  
+ Exists (or exists with future enhancements)  
- Does not exist yet.  
! Important  

HouseofCat.io

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].