Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelklishin/lapin
Experimental F# client for RabbitMQ. HIGHLY INCOMPLETE AND IMMATURE.
https://github.com/michaelklishin/lapin
Last synced: about 1 month ago
JSON representation
Experimental F# client for RabbitMQ. HIGHLY INCOMPLETE AND IMMATURE.
- Host: GitHub
- URL: https://github.com/michaelklishin/lapin
- Owner: michaelklishin
- License: apache-2.0
- Created: 2015-03-27T23:48:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-03-06T01:04:01.000Z (over 6 years ago)
- Last Synced: 2024-05-08T19:22:31.211Z (6 months ago)
- Language: F#
- Size: 2.08 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Lapin, RabbitMQ client for FSharp
Lapin is a young RabbitMQ client library for F#.
It builds on top of the [RabbitMQ .NET client](http://www.rabbitmq.com/dotnet.html)
and provides a number of API refinements:* More obvious and type safe API
* Significantly less need to use direct C# interoperability
* Convenience functions where appropriate
* Functions compose better## Project Maturity
Lapin is very immature, somewhat incomplete, and terribly
underdocumented.## NuGet Packages
TBD
## Documentation
Lapin API is organised in a number of modules:
* `Lapin.Core`: connection functions
* `Lapin.Channel`: operations on channels
* `Lapin.Queue`: operations on queues
* `Lapin.Exchange`: operations on exchanges
* `Lapin.Basic`: `basic.*` protocol methods (publishing, acks, etc)
* `Lapin.Consumers`: functions related to consumers### Opening and Closing Connections
`Lapin.Core.connect` is a function that takes a `Lapin.Core.ConnectionOptions`
record with connection settings:``` fsharp
open Lapin.Corelet conn = Lapin.Core.connect({hostname = Some "127.0.0.1"; port = Some 5672})
```Connections can be closed with `Lapin.Core.close` and `Lapin.Core.abort`:
``` fsharp
open Lapin.Corelet conn = Lapin.Core.connectWithAllDefaults()
Lapin.Core.close connlet conn2 = Lapin.Core.connectWithAllDefaults()
Lapin.Core.abort conn2
```The difference between the two is in that `Lapin.Core.abort` will ignore any
exceptions that may be thrown.Alternatively connections can be closed by calling `IConnection.Close` on them.
`Lapin.Core.isOpen` and `Lapin.Core.isClosed` are predicate functions
with pretty self-explanatory names.### Opening and Closing Channels
Channels are opened with `Lapin.Core.open` and closed with `Lapin.Core.close`:
``` fsharp
open Lapin.Core
open Lapin.Channellet conn = Lapin.Core.connectWithAllDefaults()
let ch = Lapin.Channel.open connLapin.Channel.close ch
Lapin.Core.close conn
````Lapin.Channel.isOpen` and `Lapin.Channel.isClosed` are predicate functions that...
you knew it!### Operations on Queues
TBD
### Consuming Messages
TBD
### Operations on Exchanges
TBD
### Publishing
TBD
## Contributing and Building from Source
Lapin requires Visual Studio 2013 (Community Edition is OK) or later,
.NET 4.5, and F# 3.1 or later.To build the project from the command line, run `msbuild.exe` or `xbuild` (on Mono).
To run tests, make sure that RabbitMQ is running on localhost (stock defaults are OK)
and runmsbuild.exe /t:Test RabbitMQ.Lapin.Tests/Lapin.Tests.fsproj
Contributions are accepted via pull requests on GitHub.
## License
Released under the Apache Software License 2.0.