pivotal-cf/rabbit-example-app

Name: rabbit-example-app

Owner: Pivotal Cloud Foundry

Description: Example app to demonstrate how HAProxy reroutes traffic when a node fails

Created: 2015-02-18 15:05:39.0

Updated: 2018-05-22 15:20:18.0

Pushed: 2018-05-22 15:20:16.0

Homepage: null

Size: 5220

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Installation

Inside the app repository, run the following commands:

 push test-app
 bind-service test-app my_rabbitmq_service
 restage test-app

Development

Install dependencies and run all the specs:

le --local
le exec rspec

The Guard runner is provided for faster feedback from the specs:

le exec guard

Usage

To write messages to the queue:

://test-app.<YOUR_DOMAIN>/write

To read messages from the queue:

://test-app.<YOUR_DOMAIN>/read

While the write and read endpoints will open a websocket, the store endpoint allows you to write and read single messages using HTTP POST and GET requests. For example:

 -XPOST -d 'test' http://test-app.<YOUR-DOMAIN>/store

 -XGET http://test-app.<YOUR-DOMAIN>/store

The queues endpoint allows writing and reading single messages to and from a specific queue using HTTP POST and GET requests:

 -XPOST -d 'test' http://test-app.<YOUR-DOMAIN>/queues/<YOUR-QUEUE-NAME>

 -XGET http://test-app.<YOUR-DOMAIN>/queues/<YOUR-QUEUE-NAME>
If you haveHAProxy allows HTTPS traffic only enabled in CloudFoundry, then

Demonstration

License

Released under the Apache 2.0 license

(c) 2015, Pivotal Software


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.