Home

Awesome

RestQ Build Status


HTTP message broker enabling software solutions to decouple, connect and scale. Designed to accommodate guaranteed delivery, asynchronous processing, non-blocking operations, push notifications, data discovery, worker queues, and many more enterprise patterns.

Features

FeatureDescription
Open StandardsConfiguration of the broker and message generation is all done via a HTTP RESTful application programming interface.
DiscoveryThe ability to query and discover Queues/Subscriptions of importance.
DecorationQueues/Subscriptions can be annotated with properties to tag, categorise and aid discovery.
PubSubSupport for the Publish-Subscribe messaging pattern.
Message IntegrityContent-MD5 end-to-end message integrity checking (MIC).
LoggingCustomise how and where log entries are created.
IPv4/IPv6Internet Protocol Version 4/6 Network Support.
ArchitectureAsynchronous single or multi-threaded architecture, capable of addressing the C10K problem.
Address BindingBind HTTP and/or HTTPS services to separate IP addresses.
CommunityActive, vibrant and energetic open source community.
SupportCommercial support is available from Corvusoft.

Example

See the exchange example for service implementation details.

Create Queue
curl -XPOST http://localhost:1984/queues --data '{ "data": { "name": "biz-logic-events" } }' -H'Content-Type: application/json' -H'Accept: application/json' -H'Host: localhost:1984' -v
HTTP/1.1 201 Created
Expires: 0
Pragma: no-cache
Connection: close
Accept-Ranges: none
Content-Length: 192
Server: corvusoft/restq
ETag: "58929204637930416000"
Allow: GET,PUT,HEAD,DELETE,OPTIONS
Date: Mon, 07 Mar 2016 02:54:57 GMT
Content-MD5: 1FDBFBECFF809C2EC325ACDC83EF7A26
Content-Type: application/json; charset=utf-8
Last-Modified: Mon, 07 Mar 2016 02:54:57 GMT
Cache-Control: private,max-age=0,no-cache,no-store
Location: http://localhost:1984/queues/040ab769-e4ba-40bb-886b-37bb6800baed
Vary: Accept,Accept-Encoding,Accept-Charset,Accept-Language
{ "data": {
    "type": "queue",
    "modified": 1457319297,
    "name": "biz-logic-events",
    "revision": "58929204637930416000",
    "origin": "[::ffff:127.0.0.1]:61957",
    "key": "040ab769-e4ba-40bb-886b-37bb6800baed"
  }
}
Create Subscription
curl -XPOST http://localhost:1984/subscriptions --data '{ "data": { "endpoint": "http://localhost:1985", "queues": [ "040ab769-e4ba-40bb-886b-37bb6800baed" ] } }' -H'Content-type: application/json' -H'Accept: application/json' -H'Host: localhost:1984' -v
HTTP/1.1 201 Created
Expires: 0
Pragma: no-cache
Connection: close
Content-Length: 208
Accept-Ranges: none
Server: corvusoft/restq
ETag: "16962065903070504062"
Allow: GET,PUT,HEAD,DELETE,OPTIONS
Date: Mon, 07 Mar 2016 03:07:04 GMT
Last-Modified: Mon, 07 Mar 2016 03:07:04 GMT
Content-MD5: 3A910593944580831B7797F63244505B
Content-Type: application/json; charset=utf-8
Cache-Control: private,max-age=0,no-cache,no-store
Vary: Accept,Accept-Encoding,Accept-Charset,Accept-Language
Location: http://localhost:1984/subscriptions/3a627a94-66da-45e7-a7fb-c700fd877e58
{ "data": {
    "type": "subscription"
    "modified": 1457320024,
    "revision": "16962065903070504062",
    "endpoint": "http://localhost:1985",
    "origin": "[::ffff:127.0.0.1]:62036",
    "key": "3a627a94-66da-45e7-a7fb-c700fd877e58",
  }
}
Create Message
curl -XPOST --data 'Payroll server is low on disk space.' 'http://localhost:1984/queues/040ab769-e4ba-40bb-886b-37bb6800baed/messages' -H'Content-Type: text/plain' -H'Accept: application/json' -H'Host: localhost:1984' -v

or

curl -XPOST --data 'Payroll server is low on disk space.' 'http://localhost:1984/messages?name=biz-logic-events' -H'Content-Type: text/plain' -H'Accept: application/json' -H'Host: localhost:1984' -v
HTTP/1.1 202 Accepted
Expires: 0
Allow: OPTIONS
Pragma: no-cache
Connection: close
Accept-Ranges: none
Server: corvusoft/restq
Date: Mon, 07 Mar 2016 03:34:06 GMT
Cache-Control: private,max-age=0,no-cache,no-store
Location: /messages/6dbb7894-3f04-4e71-97c0-aefde07fefb5
Vary: Accept,Accept-Encoding,Accept-Charset,Accept-Language

Given you have a consumer waiting on the subscription endpoint (http://localhost:1985). You'll see the message dispatched. See documentation and the acceptance test suite for further details and configurations.

License

© 2014-2016 Corvusoft Limited, United Kingdom. All rights reserved.

The RestQ framework is dual licensed; See LICENSE for full details.

Support

Please contact sales@corvusoft.co.uk, for support and licensing options including bespoke software development, testing, design consultation, training, mentoring and code review.

Build

git clone --recursive https://github.com/corvusoft/restq.git
mkdir restq/build
cd restq/build
cmake [-DBUILD_TESTS=YES] [-DBUILD_EXAMPLES=YES] [-DBUILD_SSL=NO] [-DBUILD_SHARED=YES] [-DCMAKE_INSTALL_PREFIX=/output-directory] ..
make [-j CPU_CORES+1] install
make test

You will now find all required components installed in the distribution folder.

Please submit all enhancements, proposals, and defects via the issue tracker; Alternatively ask a question on StackOverflow tagged #restq.

Test

The lettuce.py behaviour driven development tool is required to run this test suite.

cd restq
./distribution/example/http_example

lettuce --failfast --random -t-manual test/acceptance/features

The acceptance tests can be located here. They're also a good starting point for developers wishing to integrate with RestQ.

Minimum Requirements

ResourceRequirement
CompilerC++11 compliant or above
OSBSD, Linux, Mac OSX, Solaris, Windows, Raspbian

Road Map

MilestoneFeatureStatus
1.0Asynchrounous HTTP Servicecomplete
1.0HTTP 1.0/1.1 Compliancecomplete
1.0PubSub Patterncomplete
1.0Custom Formatterscomplete
1.0Multi-Threaded service capabilitycomplete
1.0Bind Service to specific Addresscomplete
1.0Query/Subscription Searchcomplete
1.5API Documentationcomplete
1.5Secure Socket Layercomplete
1.5Simultaneous Network Ports (HTTP/HTTPS)complete
1.5Signal Handlingcomplete
1.5Queue Message Limitcomplete
1.5Queue Message Size Limitcomplete
1.5Queue Subscription Limitcomplete
2.0Worker Queuepending
2.0Custom Compressionpending
2.0Subscription Header Filterspending
2.0Custom Authenticationpending
2.0Custom Encodingspending
2.0Custom Character Setspending
2.0Custom Dispatchespending
2.0Localisationpending
2.0Direct/Indirect Messagingpending
2.5User Interfacepending
2.5Runtime Modificationspending
2.5HTTP 2 compliancepending
2.5Refactor, Reduce, Reusepending

Contact

MethodDescription
TwitterTweet us your questions & feature requests.
support@corvusoft.co.ukSupport related queries.
sales@corvusoft.co.ukSale related queries.