Prepare Your Environment

The environment(s) that act as the message source and message consumer needs to have Java and, optionally, Groovy installed. The example can work with Java 8 or later (Java 8 is sufficient to run the code using Groovy). This exercise in this playbook uses Java 11.

  1. Set the following policies in the compartment to be used:
    allow any-user to manage queues in compartment compartment-name
    allow any-user to manage queue-pull in compartment compartment-name
    allow any-user to manage queue-push in compartment compartment-name
  2. Provide the client and consumer user credentials to enable OCI connectivity.
  3. Download the following:

    Note:

    See the Explore More topic, elsewhere in this playbook, for live links to the resources listed below.
    • Provided source code from https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdk.htm and the file system allowing files to be executed.
    • The OCI Java SDK and the code and scripts from https://github.com/oracle-devrel/oci-arch-queue-demo.

      You can find the steps for obtaining the SDK in this repository. You will need to unpack and the JARs into a /lib folder relative to the location of where you'll run the app (or amend the provided script to point to the desired folder).