Your app is ready!

This is a template for a Java web app that sends expensive operations to a message queue for asynchronous processing by one or more worker dynos. The sample code uses the Spring AMPQ library along with the Heroku RabbitMQ add-on. To try it out go to the Big Operation Submission Form. Then use the Command Line to deploy some changes.

Using Command Line:

Step 1. Setup your environment

  1. Install the Heroku Toolbelt.
  2. Install Maven.

Step 2. Login to Heroku

heroku login
Be sure to create, or associate an SSH key with your account.
$ heroku login
Enter your Heroku credentials.
Email: [email protected]
Password:
Could not find an existing public key.
Would you like to generate one? [Yn] Y
Generating new SSH public key.
Uploading SSH public key /Users/Administrator/.ssh/id_rsa.pub
Authentication successful.

Step 3. Clone the App

git clone -o heroku [email protected]:.git

Step 4. Makes some changes to the app

  1. Open worker/src/main/java/com/heroku/devcenter/BigOperationWorker.java in your favorite editor
  2. Change the listener to print the name of the operation in uppercase by adding to the onMessage() method:
    System.out.println(bigOp.getName().toUpperCase());

Step 5. Make sure the app still compiles

mvn clean package

Step 6. Deploy your changes

  1. git commit -am "New changes to deploy"
  2. git push heroku master

Done!

You've just cloned, modified, and deployed a brand new app.

See your changes

Learn more at the Heroku Dev Center