Step 4: Creating Applications

Creating Your Applications

In this step you will create your Producer and Consumer applications in Self-Service to make sure that your actual application is authorized to both produce and consume from the stream you have just created.

Log in to the Self-Service portal using the credentials supplied by Axual. The following screen will be shown:

Dashboard

Creating Producer Application

  1. Click "Applications"

Application overview
  1. Click "New application" (displayed in the picture above, on the top right side)

New application view
  1. Define an ID for your application, this value is used internally for managing kafka offset - "io.axual.example.client.avro.producer"

  2. Define a name for your application - "log event producer"

  3. Define a short name for your application - "logeventproducer"

  4. Select "demo’s Team" as your team

  5. Select "Custom" as the application Type and select "Java" or "DotNet" in the dropdown below

  6. Select "Java" as the application type

  7. Select "Public" as visibility

  8. Enter a relevant description of your application

  9. Click "Add application" to create the application

You will see that the application is created, but a principal needs to be added for the "Getting Started" environment.

applications log event producer

Creating Consumer Application

The steps of the Consumer are not much different, except for the naming:

  1. Click "Applications"

  2. Click "New application" (displayed in the picture above, on the top right side)

  3. Define an ID for your application, this value is used internally for managing kafka offset - "io.axual.example.client.avro.consumer"

  4. Define a name for your application - "log analyzer consumer"

  5. Define a short name for your application - "loganalyzer"

  6. Select "demo’s Team" as your team

  7. Select "Custom" as the application Type and select "Java" or "DotNet" in the dropdown below

  8. Select "Public" as visibility

  9. Enter a relevant description of your application

  10. Click "Add application" to create the application

You will see that the application is created, but a principal needs to be added for the "example" environment in the next step.

applications log analyzer consumer

Configuring The Applications

The application principal is used to authorize the application to use the stream (either producing or consuming). The principal is formed by the Distinguished Name (DN) of the certificate used by the application.

For every distinct environment, a principal needs to be defined. Without a principal, an application can not have consume or produce access to a stream.

To configure the application principal on the selected environment:

  1. Visit the detail page of the application.

  2. Select the "example" environment for which we want to configure the principal

  3. Click on the Configure button in the application box. You will see a modal as below:

Configure application principals modal
  1. Upload your application certificate.
    The certificate file for your Getting Started application can be found in your care package. See also Step 3

  2. The certificate chain will be shown. Confirm that the uploaded certificate matches the certificate you will use for your application in the corresponding environment.

  3. Click on Save.
    The application box name will turn green indicating that the application is configured properly on that environment. Above steps can be repeated for different environments where application is required to access the stream.

Repeat the steps above for your Consumer application.

if you are not using a local Axual installation, you generate a PEM file from the keystore of your requested certificate.

Requesting Stream Access

Once you have added principals for your applications you will need to request (produce/consume) access to the stream.

Requesting Stream Access for Producer Application

  1. Open the "Log Event Producer" application

  2. Click on the "+ Add Request" button

  3. Click Producer in the "Application Type"

  4. Select "applicationlogevents" in the "Stream" dropdown

  5. Select "example the "On environment" dropdown

You should now have a modal that is configured as follows:

Our configured stream request modal for producer
  1. Finally click "Request Approval".

The application’s stream access will be automatically accepted.

Requesting Stream Access for Consumer Application

  1. Open the "Log Analyzer"

  2. Click on the "+ Add Request" button

  3. Click "Consumer" in the "Application Type" section

  4. Select "applicationlogevents" in the "Stream" dropdown

  5. Select "example the "On environment" dropdown

You should now have a modal that is configured as follows:

Our configured stream request modal for consumer
  1. Finally, click "Request Approval".

The application’s stream access will be automatically accepted.

In this getting started, a private environment is used for which Stream Access Approval from the Stream Owner is not needed. Read more about authorizing stream access here.

Next Step: Producing data

In the next step you will actually start producing some data to the newly created stream.