cloudfoundry-samples/spring-amqp-samples

Name: spring-amqp-samples

Owner: Cloud Foundry Sample Applications

Description: Sample for Spring AMQP

Created: 2013-06-14 00:08:26.0

Updated: 2017-04-15 16:56:48.0

Pushed: 2013-06-14 05:17:42.0

Homepage: http://www.springsource.org/spring-amqp

Size: 394

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

This is a sample project that shows how to use RabbitMQ with Spring AMQP and Cloud Foundry.

The application uses Spring Java configuration and the cloudfoundry-runtime library to get the credentials necessary to connect to a RabbitMQ service. See the Cloud Foundry documentation for details on configuring a Spring application for Cloud Foundry using the cloudfoundry-runtime library, and the connection configuration code to see how this application is configured.

Building and running locally

To build the web application, use the following commands:

$ cd stocks
$ mvn package

To run the application locally, you must first download, install, and run a RabbitMQ server. Once the server is up and running, use the following command to run the web application:

$ mvn jetty:run

After the application starts, you can browse to http://localhost:8080/spring-rabbit-stocks/.

Deploying to Cloud Foundry

After installing in the 'cf' command-line interface for Cloud Foundry, targeting a Cloud Foundry instance, and logging in, the application can be pushed using these commands:

$ cd stocks
$ mvn package
$ cf push

The provided manifest.yml file will be used to provide the application parameters to Cloud Foundry. You may need to provide a different URL for the application if the spring-stocks URL is already being used in your Cloud Foundry domain.


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.