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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Inside the app repository, run the following commands:
push test-app
bind-service test-app my_rabbitmq_service
restage test-app
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
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>
HAProxy allows HTTPS traffic only
enabled in CloudFoundry, thenbosh stop rabbitmq-haproxy-partition-default_az_guid <index>
bosh stop rabbitmq-server-partition-default_az_guid <index>
to simulate a RabbitMQ node failingReleased under the Apache 2.0 license
(c) 2015, Pivotal Software