Using AMQ Online on OpenShift Container Platform

Red Hat AMQ 7.2

For Use with AMQ Online 1.0-Beta

Abstract

This guide describes how to use AMQ Online.

Chapter 1. Introduction

1.1. AMQ Online overview

Red Hat AMQ Online is an OpenShift-based mechanism for delivering messaging as a managed service. With Red Hat AMQ Online administrators can configure a cloud-native, multi-tenant messaging service either in the cloud or on premise. Developers can provision messaging using the AMQ Online console. Multiple development teams can provision the brokers and queues from the console, without requiring each team to install, configure, deploy, maintain, or patch any software.

The following table shows the supported features for AMQ Online 1.0-Beta:

Table 1.1. Supported features reference table

Feature Brokered address spaceStandard address space

Address type

Queue

Yes

Yes

Topic

Yes

Yes

Multicast

No

Yes

Anycast

No

Yes

Subscription

No

Yes

Messaging protocol

AMQP

Yes

Yes

MQTT

Yes

Technology preview only

CORE

Yes

No

OpenWire

Yes

No

STOMP

Yes

No

Transports

TCP

Yes

Yes

WebSocket

Yes

Yes

Durable subscriptions

JMS durable subscriptions

Yes

No

"Named" durable subscriptions

No

Yes

JMS

Transaction support

Yes

No

Selectors on queues

Yes

No

Message ordering guarantees (including prioritization)

Yes

No

Scalability

Scalable distributed queues and topics

No

Yes

1.2. Support statement and resources

The AMQ Online 1.0-Beta release is provided as a service to customers who want to try the AMQ Online features and work with support when problems are encountered. Support for Beta releases is limited to commercially reasonable effort and non-production use cases, and all support cases must be opened with a severity of 4. Patches will not be provided, but bug fixes might be incorporated in future releases. To contact support, visit Open a Support Case.

1.3. Supported configurations

For more information about AMQ Online supported configurations see Red Hat AMQ 7 Supported Configurations.

1.4. Document conventions

1.4.1. Variable text

This document contains code blocks with variables that you must replace with values specific to your installation. In this document, such text is styled as italic monospace.

For example, in the following code block, replace my-namespace with the namespace used in your installation:

sed -i 's/amq-online-infra/my-namespace/' install/bundles/enmasse-with-standard-authservice/*.yaml

Chapter 2. Getting Started

2.1. AMQ Online on OpenShift

This guide will walk through the process of setting up AMQ Online on OpenShift with clients for sending and receiving messages.

Prerequisites

  • To install AMQ Online, the OpenShift client tools are required.
  • An OpenShift cluster is required.
  • A user on the OpenShift cluster with cluster-admin permissions is required to set up the required cluster roles and API services.

2.1.1. Downloading AMQ Online

Procedure

Note

Although container images for AMQ Online are available in the Red Hat Container Catalog, we recommend that you use the YAML files provided instead.

2.1.2. Installing AMQ Online using a YAML bundle

The simplest way to install AMQ Online is to use the predefined YAML bundles.

Procedure

  1. Log in as a user with cluster-admin privileges:

    oc login -u system:admin
  2. (Optional) Replace namespace if you want to deploy to something other than amq-online-infra (and substitute amq-online-infra in subsequent steps):

    sed -i 's/amq-online-infra/my-namespace/' install/bundles/amq-online/*.yaml
  3. Create the project where you want to deploy AMQ Online:

    oc new-project amq-online-infra
  4. Deploy using the amq-online bundle:

    oc apply -f install/bundles/amq-online

2.1.3. Creating address spaces using the command line

Procedure

  1. Log in as a messaging tenant:

    oc login -u developer
  2. Create the project for the messaging application:

    oc new-project myapp
  3. Create an address space definition:

    apiVersion: enmasse.io/v1alpha1
    kind: AddressSpace
    metadata:
      name: myspace
    spec:
      type: standard
      plan: standard-unlimited
  4. Create the address space:

    oc create -f standard-address-space.yaml
  5. Check the status of the address space:

    oc get addressspace myspace -o jsonpath={.status.isReady}

    The address space is ready for use when the above command outputs true.

2.1.4. Creating addresses using the command line

Procedure

  1. Create an address definition:

    apiVersion: enmasse.io/v1alpha1
    kind: Address
    metadata:
        name: myspace.myqueue
    spec:
        address: myqueue
        type: queue
        plan: standard-small-queue
    Note

    Prefixing the name with the address space name is required to ensure addresses from different address spaces do not collide.

  2. Create the address:

    oc create -f standard-small-queue.yaml
  3. List the addresses:

    oc get addresses -o yaml

2.1.5. Creating users using the command line

In AMQ Online users can be created using standard command-line tools.

Prerequisites

Procedure

  1. Save the user definition to a file:

    apiVersion: user.enmasse.io/v1alpha1
    kind: MessagingUser
    metadata:
      name: myspace.user1
    spec:
      username: user1
      authentication:
        type: password
        password: cGFzc3dvcmQ= # Base64 encoded
      authorization:
        - addresses: ["myqueue", "queue1", "queue2", "topic*"]
          operations: ["send", "recv"]
        - addresses: ["anycast1"]
          operations: ["send"]
  2. Create the user and associated user permissions:

    oc create -f user-example1.yaml
  3. Confirm that the user was created:

    oc get messagingusers

Additional resources

2.1.6. Sending and receiving messages

Prerequisites

  • Installed Apache Qpid Proton Python bindings.
  • An address space named myspace must be created.
  • An address named myqueue must be created.
  • A user named user1 with password "password" must be created.

Procedure

  1. Save Python client example to a file:

    client-example1.py

    from __future__ import print_function, unicode_literals
    import optparse
    from proton import Message
    from proton.handlers import MessagingHandler
    from proton.reactor import Container
    
    class HelloWorld(MessagingHandler):
        def __init__(self, url):
            super(HelloWorld, self).__init__()
            self.url = url
    
        def on_start(self, event):
            event.container.create_receiver(self.url)
            event.container.create_sender(self.url)
    
        def on_sendable(self, event):
            event.sender.send(Message(body="Hello World!"))
            event.sender.close()
    
        def on_message(self, event):
            print("Received: " + event.message.body)
            event.connection.close()
    
    parser = optparse.OptionParser(usage="usage: %prog [options]")
    parser.add_option("-u", "--url", default="amqps://localhost:5672/myqueue",
                      help="url to use for sending and receiving messages")
    opts, args = parser.parse_args()
    
    try:
        Container(HelloWorld(opts.url)).run()
    except KeyboardInterrupt: pass

  2. Retrieve the address space messaging endpoint host name:

    oc get addressspace myspace -o jsonpath={.status.endpointStatuses[?(@.name==\'messaging\')].externalHost}

    Use the output as the host name in the following step.

  3. Run the client:

    python client-example1.py -u amqps://user1:password@messaging.example1.com:443/myqueue

We have seen how to set up AMQ Online on OpenShift, and how to communicate with it using an AMQP client.

Chapter 3. Service Admin Guide

The service administrator guide provides resources on how to set up and manage AMQ Online, infrastructure configuration and plans.

3.1. Installing AMQ Online

3.1.1. Installing AMQ Online on OpenShift

AMQ Online can be installed using automated Ansible playbooks, the OpenShift template, or the manual steps.

Prerequisites

  • To install AMQ Online, the OpenShift client tools are required.
  • An OpenShift cluster is required.
  • A user on the OpenShift cluster with cluster-admin permissions is required to set up the required cluster roles and API services.

3.1.1.1. Downloading AMQ Online

Procedure

Note

Although container images for AMQ Online are available in the Red Hat Container Catalog, we recommend that you use the YAML files provided instead.

3.1.1.2. Installing AMQ Online using a YAML bundle

The simplest way to install AMQ Online is to use the predefined YAML bundles.

Procedure

  1. Log in as a user with cluster-admin privileges:

    oc login -u system:admin
  2. (Optional) Replace namespace if you want to deploy to something other than amq-online-infra (and substitute amq-online-infra in subsequent steps):

    sed -i 's/amq-online-infra/my-namespace/' install/bundles/amq-online/*.yaml
  3. Create the project where you want to deploy AMQ Online:

    oc new-project amq-online-infra
  4. Deploy using the amq-online bundle:

    oc apply -f install/bundles/amq-online

3.1.1.3. Installing AMQ Online using OpenShift template

Installing AMQ Online using the OpenShift template is useful for evaluating AMQ Online. For a production setup, it is recommended to use one of the following installation methods instead:

Procedure

  1. Log in as as a user with cluster-admin privileges:

    oc login -u system:admin
  2. Create the project where you want to deploy AMQ Online:

    oc new-project amq-online-infra
  3. Deploy using amq-online.yaml template:

    oc process -f install/templates/amq-online.yaml NAMESPACE=amq-online-infra | oc apply -f -

3.1.1.4. Installing AMQ Online using Ansible

Installing AMQ Online using Ansible requires creating an inventory file with the variables for configuring the system. Example inventory files can be found in the ansible/inventory folder.

An example inventory file that enables both the API server and service broker integration:

example.inventory

[enmasse]
localhost ansible_connection=local

[enmasse:vars]
namespace=enmasse-infra
enable_rbac=False
api_server=True
service_catalog=True
register_api_server=True
keycloak_admin_password=admin
authentication_services=["standard"]
enable_monitoring=False

The following Ansible configuration settings are supported:

Table 3.1. Ansible configuration settings

NameDescriptionDefault valueRequired

namespace

Specifies the namespace where AMQ Online is installed.

Not applicable

yes

enable_rbac

Specifies whether to enable RBAC authentication of REST APIs

True

no

service_catalog

Specifies whether to enable integration with the Service Catalog

False

no

authentication_services

Specifies the list of authentication services to deploy. Supported values are none and standard.

none

no

keycloak_admin_password

Specifies the admin password to use for the standard authentication service Red Hat Single Sign-On instance

Not applicable

yes (if standard authentication service is enabled)

api_server

Specifies whether to enable the REST API server

True

no

register_api_server

Specifies whether to register the API server with OpenShift master

False

no

secure_api_server

Specifies whether to enable mutual TLS for the API server

False

no

enable_monitoring

Specifies whether to enable the monitoring services

Not applicable

no

smtp_server

Specifies the SMTP server used to send alert emails

Not applicable

no

smtp_username

Specifies the username used to authenticate to the SMTP server

Not applicable

no

smtp_password

Specifies the password used to authenticate to the SMTP server

Not applicable

no

smtp_from_address

Specifies the from address displayed in alert emails

Not applicable

no

sysadmin_email

Specifies the email address to which alerts are sent

Not applicable

no

Procedure

  1. (Optional) Create an inventory file.
  2. Run the Ansible playbook:

    ansible-playbook -i inventory-file ansible/playbooks/openshift/deploy_all.yml

3.1.1.5. Installing AMQ Online manually

The manual deployment procedure can be performed on any platform supporting the OpenShift client.

3.1.1.5.1. Creating the project for AMQ Online

Procedure

  • Create the amq-online-infra project:

    oc new-project amq-online-infra
3.1.1.5.2. Deploying authentication services

AMQ Online requires at least one authentication service to be deployed. The authentication service can be none (allow all), standard (Red Hat Single Sign-On), or external (not managed by AMQ Online).

3.1.1.5.2.1. Deploying the none authentication service

Procedure

  1. Create the none authentication service:

    oc create -f ./install/components/none-authservice
3.1.1.5.2.2. Deploying the standard authentication service

Procedure

  1. (Optional) Replace namespace if you want to deploy to something other than amq-online-infra:

    sed -i 's/amq-online-infra/my-namespace/' install/components/standard-authservice/*RoleBinding*.yaml
  2. Create the standard authentication service:

    oc create -f ./install/components/standard-authservice
3.1.1.5.3. Deploying the Address Space Controller

The Address Space Controller is responsible for creating the infrastructure used by address spaces.

Procedure

  1. (Optional) Replace namespace if you want to deploy to something other than amq-online-infra:

    sed -i 's/amq-online-infra/my-namespace/' install/components/address-space-controller/*.yaml
  2. Deploy the Address Space Controller

    oc apply -f install/components/address-space-controller
3.1.1.5.4. Deploying the API server

The API server provides a REST API for creating address spaces and addresses. It can also serve as an aggregated API server if it is registered as an API service.

Procedure

  1. (Optional) Replace namespace if you want to deploy to something other than amq-online-infra (and substitute amq-online-infra in subsequent steps):

    sed -i 's/amq-online-infra/my-namespace/' install/components/api-service/*.yaml
    sed -i 's/amq-online-infra/my-namespace/' install/components/api-server/*.yaml
  2. Register API service

    oc apply -f install/components/api-service
  3. Deploy the API Server

    oc apply -f install/components/api-server/
3.1.1.5.5. (Optional) Deploying the service broker

The service broker provides an implementation of the Open Service Broker API that integrates with the OpenShift Service Catalog.

Prerequisites

  • The service broker requires the standard authentication service to be deployed.

Procedure

  1. (Optional) Replace namespace if you want to deploy to something other than amq-online-infra:

    sed -i 's/amq-online-infra/my-namespace/' install/components/service-broker/*.yaml
    sed -i 's/amq-online-infra/my-namespace/' install/components/cluster-service-broker/*.yaml
  2. Deploy the Service Broker:

    oc apply -f install/components/service-broker
  3. Register the Service Broker with the OpenShift Service Catalog:

    oc apply -f install/components/cluster-service-broker

3.1.2. Uninstalling AMQ Online on OpenShift

3.1.2.1. Uninstalling AMQ Online

Procedure

  1. Log in as a user with cluster-admin privileges:

    oc login -u system:admin
  2. Delete the project where AMQ Online is deployed:

    oc delete project amq-online-infra
  3. Delete the rolebinding in the kube-system namespace:

    oc delete rolebindings -l app=enmasse -n kube-system
  4. Delete "cluster level" resources:

    oc delete clusterrolebindings -l app=enmasse
    oc delete clusterroles -l app=enmasse
    oc delete apiservices -l app=enmasse
    oc delete oauthclients -l app=enmasse
  5. (Optional) Delete the service catalog integration:

    oc delete clusterservicebrokers -l app=enmasse

3.2. Configuring AMQ Online

3.2.1. Address space plans

Address space plans are used to configure quotas and control the resources consumed by address spaces. Address space plans are configured by the AMQ Online service operator and are selected when creating an address space.

AMQ Online includes a default set of plans that are sufficient for most use cases.

Plans are configured as custom resources. The following example shows a plan for the standard address space:

apiVersion: admin.enmasse.io/v1alpha1
kind: AddressSpacePlan
metadata:
  name: restrictive-plan
  labels:
    app: enmasse
  annotations:
    enmasse.io/defined-by: default
displayName: Restrictive Plan
displayOrder: 0
shortDescription: A plan with restrictive quotas
longDescription: A plan with restrictive quotas for the standard address space
uuid: 74b9a40e-117e-11e8-b4e1-507b9def37d9
addressSpaceType: standard
addressPlans:
- small-queue
- small-anycast
resources:
- name: router
  min: 0.0
  max: 2.0
- name: broker
  min: 0.0
  max: 2.0
- name: aggregate
  min: 0.0
  max: 2.0

The following fields are required:

  • metadata.name
  • resources
  • addressPlans
  • addressSpaceType

The other fields are used by the AMQ Online Console UI. Note the annotation enmasse.io/defined-by, which points to an infrastructure configuration that must exist when an address space using this plan is created. For more information on infrastructure configurations, see Section 3.2.3, “Infrastructure configuration”.

3.2.1.1. Creating address space plans on OpenShift

Procedure

  1. Log in as a service admin:

    oc login -u system:admin
  2. Select the project where AMQ Online is installed:

    oc project amq-online-infra
  3. Create an address space plan definition:

    apiVersion: admin.enmasse.io/v1alpha1
    kind: AddressSpacePlan
    metadata:
      name: restrictive-plan
      labels:
        app: enmasse
      annotations:
        enmasse.io/defined-by: default
    displayName: Restrictive Plan
    displayOrder: 0
    shortDescription: A plan with restrictive quotas
    longDescription: A plan with restrictive quotas for the standard address space
    uuid: 74b9a40e-117e-11e8-b4e1-507b9def37d9
    addressSpaceType: standard
    addressPlans:
    - small-queue
    - small-anycast
    resources:
    - name: router
      min: 0.0
      max: 2.0
    - name: broker
      min: 0.0
      max: 2.0
    - name: aggregate
      min: 0.0
      max: 2.0
  4. Create the address space plan:

    oc create -f restrictive-plan.yaml
  5. Verify that schema has been updated and contains the plan:

    oc get addressspaceschema standard -o yaml

3.2.2. Address plans

Address plans specify the expected resource usage of a given address. The sum of the resource usage for all resource types determines the amount of infrastructure provisioned for an address space. A single router and broker pod has a maximum usage of one. If a new address requires additional resources and the resource consumption is within the address space plan limits, a new pod will be created automatically to handle the increased load.

Address plans are configured by the AMQ Online service operator and are selected when creating an address.

AMQ Online includes a default set of address plans that are sufficient for most use cases.

In the Section 3.2.1, “Address space plans” section, the address space plan references two address plans: small-queue and small-anycast. These address plans are stored as custom resources and are defined as follows:

apiVersion: admin.enmasse.io/v1alpha1
kind: AddressPlan
metadata:
  name: small-queue
  labels:
    app: enmasse
displayName: Small queue plan
displayOrder: 0
shortDescription: A plan for small queues
longDescription: A plan for small queues that consume little resources
uuid: 98feabb6-1183-11e8-a769-507b9def37d9
addressType: queue
requiredResources:
- name: router
  credit: 0.2
- name: broker
  credit: 0.3

The following fields are required:

  • metadata.name
  • requiredResources
  • addressType

A single router can support five instances of addresses and broker can support three instances of addresses with this plan. If the number of addresses with this plan increases to four, another broker is created. If it increases further to six, another router is created as well.

Note, however, that although the address space plan allows two routers and two brokers to be deployed, it only allows two pods to be deployed in total. This means that the address space is restricted to three addresses with the small-queue plan.

The small-anycast plan does not consume any broker resources, and can provision two routers at the expense of not being able to create any brokers:

apiVersion: admin.enmasse.io/v1alpha1
kind: AddressPlan
metadata:
  name: small-anycast
  labels:
    app: enmasse
displayName: Small anycast plan
displayOrder: 0
shortDescription: A plan for small anycast addresses
longDescription: A plan for small anycast addresses that consume little resources
uuid: cb61f440-1184-11e8-adda-507b9def37d9
addressType: anycast
requiredResources:
- name: router
  credit: 0.2

With this plan, up to 10 addresses can be created.

3.2.2.1. Creating address plans on OpenShift

Procedure

  1. Log in as a service admin:

    oc login -u system:admin
  2. Select the project where AMQ Online is installed:

    oc project amq-online-infra
  3. Create an address plan definition:

    apiVersion: admin.enmasse.io/v1alpha1
    kind: AddressPlan
    metadata:
      name: small-anycast
      labels:
        app: enmasse
    displayName: Small anycast plan
    displayOrder: 0
    shortDescription: A plan for small anycast addresses
    longDescription: A plan for small anycast addresses that consume little resources
    uuid: cb61f440-1184-11e8-adda-507b9def37d9
    addressType: anycast
    requiredResources:
    - name: router
      credit: 0.2
  4. Create the address plan:

    oc create -f small-anycast-plan.yaml
  5. Verify that schema has been updated and contains the plan:

    oc get addressspaceschema standard -o yaml

3.2.3. Infrastructure configuration

AMQ Online creates infrastructure components such as routers, brokers, and consoles. These components can be configured while the system is running, and AMQ Online automatically updates the components with the new settings. The AMQ Online service operator can edit the AMQ Online default infrastructure configuration or create new configurations.

Infrastructure configurations can be referred to from one or more address space plans. For more information about address space plans, see Section 3.2.1, “Address space plans”.

Infrastructure configuration can be managed for both brokered and standard infrastructure using BrokeredInfraConfig and StandardInfraConfig resources.

3.2.3.1. Brokered infrastructure configuration

BrokeredInfraConfig resources is used to configure infrastructure deployed by brokered address spaces. The brokered infra configuration is referenced by address space plans using a enmasse.io/defined-by annotation. For more information, see Section 3.2.1, “Address space plans”.

apiVersion: admin.enmasse.io/v1alpha1
kind: BrokeredInfraConfig
metadata:
  name: brokered-infra-config-example
spec:
  version: 0.23.0
  admin:
    resources:
      memory: 256Mi
  broker:
    resources:
      memory: 2Gi
      storage: 100Gi
    addressFullPolicy: PAGE

The version field specifies the AMQ Online version used. When upgrading, AMQ Online uses this field whether to upgrade the infrastructure to the requested version.

The admin object specifies the settings you can configure for the admin components.

The broker object specifies the settings you can configure for the broker components. Changing the .broker.resources.storage setting does not configure existing broker storage size.

3.2.3.2. Standard infrastructure configuration

StandardInfraConfig resources is used to configure infrastructure deployed by standard address spaces. The standard infra configuration is referenced by address space plans using a enmasse.io/defined-by annotation. For more information, see Section 3.2.1, “Address space plans”.

apiVersion: admin.enmasse.io/v1alpha1
kind: StandardInfraConfig
metadata:
  name: myconfig
spec:
  version: 0.23.0
  admin:
    resources:
      memory: 256Mi
  broker:
    resources:
      memory: 2Gi
      storage: 100Gi
    addressFullPolicy: PAGE
  router:
    resources:
      memory: 256Mi
    linkCapcity: 1000

The version field specifies the AMQ Online version used. When upgrading, AMQ Online uses this field whether to upgrade the infrastructure to the requested version.

The admin object specifies the settings you can configure for the admin components.

The broker object specifies the settings you can configure for the broker components. Changing the .broker.resources.storage setting does not configure existing broker storage size.

The router object specifies the settings you can configure for the router components.

3.2.3.3. Applying infrastructure configuration on OpenShift

You can edit existing configurations or create new ones.

Prerequisites

Procedure

  1. Log in as a service operator:

    oc login -u developer
  2. Select the project where AMQ Online is installed:

    oc project enmasse
  3. Create infrastructure configuration:

    apiVersion: admin.enmasse.io/v1alpha1
    kind: StandardInfraConfig
    metadata:
      name: myconfig
    spec:
      version: 0.23.0
      admin:
        resources:
          memory: 256Mi
      broker:
        resources:
          memory: 2Gi
          storage: 100Gi
        addressFullPolicy: PAGE
      router:
        resources:
          memory: 256Mi
        linkCapcity: 1000
  4. Apply the configuration changes:

    oc apply -f standard-infra-config-example.yaml
  5. Monitor the pods while they are restarted:

    oc get pods -w

    The configuration changes will be applied within a couple of minutes.

3.3. Upgrading AMQ Online

3.3.1. Upgrading AMQ Online on OpenShift

AMQ Online supports upgrades between minor versions using cloud native tools and the same mechanism used to apply configuration changes. When upgrading, the updated infrastructure configuration of the new version will trigger the upgrade to start.

Upgrading AMQ Online is done by applying the YAML files for the new version.

3.3.1.1. Upgrading AMQ Online on OpenShift using a YAML bundle

Prerequisites

Procedure

  1. Log in as a service operator:

    oc login -u system:admin
  2. Select the project where AMQ Online is installed:

    oc project amq-online-infra
  3. Apply the new release bundle:

    oc apply -f install/bundles/amq-online
  4. Monitor pods while they are restarted:

    oc get pods -w

    The upgrade should cause all pods to be restarted within a couple of minutes.

3.3.1.2. Upgrading AMQ Online on OpenShift using Template

Prerequisites

Procedure

  1. Log in as a service operator:

    oc login -u system:admin
  2. Select the project where AMQ Online is installed:

    oc project amq-online-infra
  3. Apply the new release template:

    oc process -f install/templates/amq-online.yaml NAMESPACE=amq-online-infra | oc apply -f -
  4. Monitor pods while they are restarted:

    oc get pods -w

    The upgrade should cause all pods to be restarted within a couple of minutes.

3.3.1.3. Upgrading AMQ Online on OpenShift using Ansible

Prerequisites

Procedure

  1. Log in as a service operator:

    oc login -u system:admin
  2. Run the Ansible playbook from the new release:

    ansible-playbook -i inventory-file ansible/playbooks/openshift/deploy_all.yml
  3. Monitor pods while they are restarted:

    oc get pods -w

    The pods restart and become active within several minutes.

3.4. Monitoring AMQ Online

3.4.1. Monitoring AMQ Online on OpenShift

Monitoring services run frequent health checks on AMQ Online and send alerts when health checks fail. Health is assessed using Prometheus and kube-state-metrics. Alerting is implemented with Alertmanager. Grafana is also configured to provide a dashboard of the current status of health checks.

3.4.1.1. Deploying Prometheus

Procedure

  1. Replace the namespace with the namespace AMQ Online is currently deployed to:

    sed -i 's/amq-online-infra/_my-namespace_/' install/components/prometheus/*.yaml
  2. Create the Prometheus deployment:

    oc apply -f ./install/components/prometheus

3.4.1.2. Deploying kube-state-metrics

Procedure

  1. Replace the namespace with the namespace AMQ Online is currently deployed to:

    sed -i 's/amq-online-infra/_my-namespace_/' install/components/kube-state-metrics/*.yaml
  2. Create the kube-state-metrics deployment:

    oc apply -f ./install/components/kube-state-metrics

3.4.1.3. Deploying Alertmanager

Prerequisites

  • You must have already installed Prometheus and kube-state-metrics.

Procedure

  1. Replace the namespace with the namespace AMQ Online is currently deployed to:

    sed -i 's/amq-online-infra/_my-namespace_/' install/components/alertmanager/*.yaml
  2. Create the Alertmanager deployment:

    oc apply -f ./install/components/alertmanager
  3. (Optional) Configure Alertmanager to send emails using a custom configmap with the relevant SMTP details:

    oc apply -f ./alertmanager-configmap.yaml

    An example Alertmanager config map:

apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: enmasse
  name: alertmanager-config
data:
  alertmanager.yml: |
    global:
      resolve_timeout: 5m
      smtp_smarthost: localhost
      smtp_from: alerts@localhost
      smtp_auth_username: admin
      smtp_auth_password: password
    route:
      group_by: ['alertname']
      group_wait: 60s
      group_interval: 60s
      repeat_interval: 1h
      receiver: 'sysadmins'
    receivers:
    - name: 'sysadmins'
      email_configs:
      - to: sysadmin@localhost
    inhibit_rules:
      - source_match:
          severity: 'critical'
        target_match:
          severity: 'warning'
        equal: ['alertname']

3.4.1.4. Deploying Grafana

Prerequisites

  • You must have already installed Prometheus and kube-state-metrics.

Procedure

  1. Replace the namespace with the namespace AMQ Online is currently deployed to:

    sed -i 's/amq-online-infra/_my-namespace_/' install/components/grafana/*.yaml
  2. Create the Grafana deployment:

    oc apply -f ./install/components/grafana

3.4.1.5. Restarting a component

Procedure

  • Delete the component’s pod:

    oc delete pod -l name=component

The component will be automatically restarted in a new pod.

3.4.1.6. Viewing router logs

Procedure

  1. List all router pods and choose the pod for the relevant address space:

    oc get pods -l name=qdrouterd -o go-template --template '{{range .items}}{{.metadata.name}}{{"\t"}}{{.metadata.annotations.addressSpace}}{{"\n"}}{{end}}'
  2. Display the logs for the pod:

    oc logs pod -c router

3.4.1.7. Viewing broker logs

Procedure

  1. List all broker pods and choose the pod for the relevant address space:

    oc get pods -l role=broker -o go-template --template '{{range .items}}{{.metadata.name}}{{"\t"}}{{.metadata.annotations.addressSpace}}{{"\n"}}{{end}}'
  2. Display the logs for the pod:

    oc logs pod

3.4.1.8. Viewing message and connection statistics using the AMQ Online Console

Prerequisites

  • You must be logged into the AMQ Online Console.

Table 3.2. Message statistics reference table

To view…​On the Addresses page see…​

Address status

The first column (the symbol preceding the address name)

Address type

The third column

Address plan

The fourth column

Message ingress rate (during the last 5 minutes)

Messages In

Message egress rate (during the last 5 minutes)

Messages Out

Number of senders attached

Senders

Number of receivers attached

Receivers

Queue and topic address types only: Number of stored messages on the broker or brokers

Stored

Standard address space only: Message deliveries per second

For the desired address, expand the twisty on the left to show the Senders table; see the Delivery Rate column.

Table 3.3. Connection statistics reference table

To view…​On the Connections page see…​

Total number of messages received as long the connection has existed

Messages In

Standard address space only: Total number of messages sent as long the connection has existed

Messages Out

Total number of messages delivered

For the desired connection, expand the twisty on the left to show the Senders and Receivers tables; see the Deliveries columns.

Standard address space only: Username used by the client to connect

The third column

3.4.1.9. Using qdstat on OpenShift

You can use qdstat to monitor the AMQ Online service.

3.4.1.9.1. Viewing router connections using qdstat

You can view the router connections using qdstat.

Procedure

  1. On the command line, run the following command to obtain the podname value needed in the following step:

    oc get pods
  2. On the command line, run the following command:

    oc exec -n namespace -it qdrouterd-podname -- qdstat -c
    
    Connections
      id   host                 container                             role    dir  security                              authentication                tenant
      =========================================================================================================================================================
      3    172.17.0.9:34998     admin-78794c68c8-9jdd6                normal  in   TLSv1.2(ECDHE-RSA-AES128-GCM-SHA256)  CN=admin,O=io.enmasse(x.509)
      12   172.30.188.174:5671  27803a14-42d2-6148-9491-a6c1e69e875a  normal  out  TLSv1.2(ECDHE-RSA-AES128-GCM-SHA256)  x.509
      567  127.0.0.1:43546      b240c652-82df-48dd-b54e-3b8bbaef16c6  normal  in   no-security                           PLAIN
3.4.1.9.2. Viewing router addresses using qdstat

You can view the router addresses using qdstat.

Procedure

  1. On the command line, run the following command to obtain the podname value needed in the following step:

    oc get pods
  2. Run the following command:

    oc exec -n namespace -it qdrouterd-podname -- qdstat -a
    
    Router Addresses
      class     addr                   phs  distrib       in-proc  local  remote  cntnr  in     out    thru  to-proc  from-proc
      ===========================================================================================================================
      local     $_management_internal       closest       1        0      0       0      0      0      0     588      588
      link-in   $lwt                        linkBalanced  0        0      0       0      0      0      0     0        0
      link-out  $lwt                        linkBalanced  0        0      0       0      0      0      0     0        0
      mobile    $management            0    closest       1        0      0       0      601    0      0     601      0
      local     $management                 closest       1        0      0       0      2,925  0      0     2,925    0
      local     qdhello                     flood         1        0      0       0      0      0      0     0        5,856
      local     qdrouter                    flood         1        0      0       0      0      0      0     0        0
      topo      qdrouter                    flood         1        0      0       0      0      0      0     0        196
      local     qdrouter.ma                 multicast     1        0      0       0      0      0      0     0        0
      topo      qdrouter.ma                 multicast     1        0      0       0      0      0      0     0        0
      local     temp.VTXOKyyWsq7OEei        balanced      0        1      0       0      0      0      0     0        0
      local     temp.k2RGQNPe6sDMvz4        balanced      0        1      0       0      0      3,511  0     0        3,511
      local     temp.xg+y8I_Tr4Y94LA        balanced      0        1      0       0      0      5      0     0        5

Chapter 4. Tenant Guide

The tenant guide provides resources on how to manage address spaces, addresses,and users as a messaging tenant.

4.1. Address space

An address space is a group of addresses that can be accessed through a single connection (per protocol). This means that clients connected to the endpoints of an address space can send messages to or receive messages from any authorized address within that address space. An address space can support multiple protocols, as defined by the address space type.

AMQ Online has two types of address spaces:

  • Standard
  • Brokered

4.2. Address

An address is part of an address space and represents a destination for sending and receiving messages. An address has a type, which defines the semantics of sending messages to and receiving messages from that address.

The types of addresses available in AMQ Online depend on the address space type.

4.3. Standard address space

The standard address space is the default address space in AMQ Online. It consists of an AMQP router network in combination with attachable storage units. Clients connect to a message router, which forwards messages to or from one or more message brokers. This address space type is appropriate when you have many connections and addresses. However, the standard address space has the following limitations:

  • No transaction support
  • No message ordering
  • No selectors on queues
  • No browsing on queues
  • No message groups

Clients connect and send and receive messages in this address space using the AMQP or MQTT protocols. Note that MQTT does not support qos2 or retained messages.

4.3.1. Standard address types

The standard address space supports five different address types:

  • queue
  • topic
  • anycast
  • multicast
  • subscription

4.3.1.1. Queue

The queue address type is a store-and-forward queue. This address type is appropriate for implementing a distributed work queue, handling traffic bursts, and other use cases where you want to decouple the producer and consumer. A queue can be sharded across multiple storage units. Message ordering might be lost for queues in the standard address space.

4.3.1.2. Topic

The topic address type supports the publish-subscribe messaging pattern where there are 1..N producers and 1..M consumers. Each message published to a topic address is forwarded to all subscribers for that address. A subscriber can also be durable, in which case messages are kept until the subscriber has acknowledged them.

Note

If you create a subscription on a topic, any senders to that topic must specify the topic capability.

4.3.1.2.1. Hierarchical topics and wildcards

A client receiving from a topic address can specify a wildcard address with the topic address as the root. The wildcard behavior follows the MQTT syntax:

  • / is a separator
  • + matches one level
  • # matches one or more levels

So, for example:

  • a/#/b matches a/foo/b, a/bar/b, and a/foo/bar/b
  • a/+/b matches a/foo/b and a/bar/b, but would not match a/foo/bar

In the standard address space, the first level must always be a defined topic address; that is, # and + are not valid as the first characters of a subscribing address.

4.3.1.3. Anycast

The anycast address type is a scalable direct address for sending messages to one consumer. Messages sent to an anycast address are not stored, but are instead forwarded directly to the consumer. This method makes this address type ideal for request-reply (RPC) uses or even work distribution. This is the cheapest address type as it does not require any persistence.

4.3.1.4. Multicast

The multicast address type is a scalable direct address for sending messages to multiple consumers. Messages sent to a multicast address are forwarded to all consumers receiving messages on that address. Because message acknowledgments from consumers are not propagated to producers, only pre-settled messages can be sent to multicast addresses.

4.3.1.5. Subscription

The subscription address type allows a subscription to be created for a topic that holds messages published to the topic even if the subscriber is not attached. The subscription is accessed by the consumer using <topic-address>::<subscription-address>. For example, for a subscription mysub on a topic mytopic the consumer consumes from the address mytopic::mysub.

4.4. Brokered address space

The brokered address space is designed to support broker-specific features, at the cost of limited scale in terms of the number of connections and addresses. This address space supports JMS transactions, message groups, and selectors on queues and topics.

Clients can connect and send and receive messages in this address space using the AMQP, CORE, OpenWire, and MQTT protocols.

4.4.1. Brokered address types

The brokered address space supports two address types:

  • queue
  • topic

4.4.1.1. Queue

The queue address type is a store-and-forward queue. This address type is appropriate for implementing a distributed work queue, handling traffic bursts, and other use cases where you want to decouple the producer and consumer. A queue in the brokered address space supports selectors, message groups, transactions, and other JMS features. Message order can be lost with released messages.

4.4.1.2. Topic

The topic address type supports the publish-subscribe messaging pattern in which there are 1..N producers and 1..M consumers. Each message published to a topic address is forwarded to all subscribers for that address. A subscriber can also be durable, in which case messages are kept until the subscriber has acknowledged them.

4.4.1.2.1. Hierarchical topics and wildcards

A client receiving from a topic address can specify a wildcard address with the topic address as the root. The wildcard behavior follows the MQTT syntax:

  • / is a separator
  • + matches one level
  • # matches one or more levels

So, for example:

  • a/#/b matches a/foo/b, a/bar/b, a/foo/bar/b
  • a/+/b matches a/foo/b and a/bar/b, but would not match a/foo/bar

4.5. Managing address spaces on OpenShift

AMQ Online is configured to support managing address spaces using the OpenShift command-line tools.

4.5.1. Minimal example

The minimal example shows the smallest set of options needed to create an AddressSpace.

apiVersion: enmasse.io/v1alpha1
kind: AddressSpace
metadata:
  name: myspace
spec:
  type: standard 1
  plan: standard-unlimited 2
1
The address space type can be either brokered or standard.
2
The address space plan depends on the address space type and what has been configured by the AMQ Online admin.

4.5.2. Advanced example

The advanced example show how you can configure the authentication service and endpoints of an AddressSpace.

apiVersion: enmasse.io/v1alpha1
kind: AddressSpace
metadata:
  name: myspace
spec:
  type: standard 1
  plan: standard-unlimited 2
  authenticationService:
    type: standard 3
  endpoints: 4
    - name: messaging
      service: messaging
      expose: 5
        type: route
        routeHost: messaging.example.com
        routeTlsTermination: passthrough
        routeServicePort: amqps
      cert: 6
        provider: certBundle
        tlsKey: ZXhhbXBsZSAtbgo=
        tlsCert: ZXhhbXBsZSAtbgo=
    - name: mqtt
      service: mqtt
      expose:
        type: loadbalancer
        loadBalancerPorts:
        - mqtt
        - mqtts
      cert:
        provider: selfsigned
    - name: console
      service: console
      expose:
        type: route
        routeTlsTermination: reencrypt
        routeServicePort: https
      cert:
        provider: openshift
1
The address space type can be either brokered or standard.
2
The address space plan depends on the address space type and what has been configured by the AMQ Online admin.
3
The authentication service type can be none, standard or external. External requires an additional field, details, including host and port information.
4
The endpoints that must be configured for the AddressSpace. Endpoints can specity either messaging, console or mqtt services. However, the mqtt service is supported for the standard address space type only.
5
Expose the configuration of an endpoint. Endpoints can be kept internal to the cluster, or exposed using an OpenShift route or a load-balancer service.
6
The certificate configuration can be used to specify how the endpoint certificate is provided. The provider can be selfsigned (default), wildcard (requires it to be enabled by the AMQ Online admin), openshift (signed by the OpenShift cluster CA), or certBundle (base64-encoded PEM key and certificate).

4.5.3. Example address space status output

The AddressSpace resource contains a status field that can be used to retrieve information about its state and endpoints. The following output is an example of the output you can get from running oc get addressspace myspace -o yaml:

apiVersion: enmasse.io/v1alpha1
kind: AddressSpace
metadata:
  name: myspace
spec:
  ...
status:
  isReady: false 1
  messages:
    - "One or more deployments are not ready: "
  endpointStatuses: 2
    - name: messaging
      cert: aGVsbG8= 3
      serviceHost: messaging-123.enmasse-infra.svc 4
      servicePorts: 5
        - name: amqp
          port: 5672
        - name: amqps
          port: 5671
      externalHost: messaging.example.com 6
      externalPorts: 7
        - name: amqps
          port: 443
1
The status.isReady field can be either true or false.
2
The status.endpointStatuses field provides information about available endpoints for this address space.
3
The cert field contains the base64-encoded certificate for a given endpoint.
4
The serviceHost field contains the cluster-internal host name for a given endpoint.
5
The servicePorts field contains the available ports for the cluster-internal host.
6
The externalHost field contains the external host name for a given endpoint.
7
The externalPorts field contains the available ports for the external host.

4.5.4. Creating address spaces using the command line

Procedure

  1. Log in as a messaging tenant:

    oc login -u developer
  2. Create the project for the messaging application:

    oc new-project myapp
  3. Create an address space definition:

    apiVersion: enmasse.io/v1alpha1
    kind: AddressSpace
    metadata:
      name: myspace
    spec:
      type: standard
      plan: standard-unlimited
  4. Create the address space:

    oc create -f standard-address-space.yaml
  5. Check the status of the address space:

    oc get addressspace myspace -o jsonpath={.status.isReady}

    The address space is ready for use when the above command outputs true.

4.5.5. Example commands for retrieving address space information

  • Retrieving the AMQ Online Console host name:

    oc get addressspace myspace -o jsonpath={.status.endpointStatuses[?(@.name==\'console\')].externalHost}
  • Retrieving the status of an address space:

    oc get addressspace myspace -o jsonpath={.status.isReady}
  • Retrieving the base64-encoded PEM certificate for the messaging endpoint:

    oc get addressspace myspace -o jsonpath={.status.endpointStatuses[?(@.name==\'messaging\')].cert}
  • Retrieving the host name for the messaging endpoint:

    oc get addressspace myspace -o jsonpath={.status.endpointStatuses[?(@.name==\'messaging\')].externalHost}

4.6. Managing addresses on OpenShift

AMQ Online is configured to support managing address using the OpenShift command-line tools and the AMQ Online Console.

4.6.1. Example

apiVersion: enmasse.io/v1alpha1
kind: Address
metadata:
    name: myspace.myqueue 1
spec:
    address: myqueue 2
    type: queue 3
    plan: standard-small-queue 4
1
The address name must be prefixed with the address space name and a dot. Address names can only include alphanumeric characters.
2
The address is the messaging address this address resource represents.
3
The address type dictates the semantics of this address.
4
The address plan describes the resource usage for the address.

4.6.2. Creating addresses using the command line

Procedure

  1. Create an address definition:

    apiVersion: enmasse.io/v1alpha1
    kind: Address
    metadata:
        name: myspace.myqueue
    spec:
        address: myqueue
        type: queue
        plan: standard-small-queue
    Note

    Prefixing the name with the address space name is required to ensure addresses from different address spaces do not collide.

  2. Create the address:

    oc create -f standard-small-queue.yaml
  3. List the addresses:

    oc get addresses -o yaml

4.6.3. Creating addresses using the AMQ Online Console

You can create new addresses using the AMQ Online Console. The type of addresses that you can create are determined by the type of address space.

Prerequisites

Procedure

  1. Log in to the AMQ Online Console. For more information, see Section 4.7, “Accessing the AMQ Online Console”.
  2. Click New. The Create new address window opens.
  3. Type a name and select the address type. If selecting subscription, from the Topic list select the topic name to which you want to create a subscription.
  4. Click Next.
  5. Select a plan and click Next.
  6. Click Create. Your address is displayed in the AMQ Online Console.

4.7. Accessing the AMQ Online Console

Prerequisites

Procedure

  1. In a web browser, navigate to https://console-host-name where console-host-name is the AMQ Online Console host name.
  2. Log in with your OpenShift user credentials.

4.8. Using the AMQ Online Console address filtering

The address name filtering feature in the AMQ Online Console uses regular expressions. Also, filters are cumulative.

Table 4.1. AMQ Online Console address name filtering behavior

To match…​Use…​Results in…​

The beginning of an expression only

A caret followed by an expression: ^my

All addresses beginning with my

An expression

The matching string: my

All addresses containing my

The end of an expression only

An expression followed by the dollar sign: my$

All addresses ending with my

An exact expression

A caret followed by an expression and a dollar sign: ^my$

Only the address my

4.9. Viewing message and connection statistics using the AMQ Online Console

Prerequisites

  • You must be logged into the AMQ Online Console.

Table 4.2. Message statistics reference table

To view…​On the Addresses page see…​

Address status

The first column (the symbol preceding the address name)

Address type

The third column

Address plan

The fourth column

Message ingress rate (during the last 5 minutes)

Messages In

Message egress rate (during the last 5 minutes)

Messages Out

Number of senders attached

Senders

Number of receivers attached

Receivers

Queue and topic address types only: Number of stored messages on the broker or brokers

Stored

Standard address space only: Message deliveries per second

For the desired address, expand the twisty on the left to show the Senders table; see the Delivery Rate column.

Table 4.3. Connection statistics reference table

To view…​On the Connections page see…​

Total number of messages received as long the connection has existed

Messages In

Standard address space only: Total number of messages sent as long the connection has existed

Messages Out

Total number of messages delivered

For the desired connection, expand the twisty on the left to show the Senders and Receivers tables; see the Deliveries columns.

Standard address space only: Username used by the client to connect

The third column

4.10. User model

You can create users to access messaging clients and the AMQ Online Console through user definition files, which specify the authentication type and authorization policies.

Users are configured as MessagingUser resources. Users can only be created, deleted, read, updated, and listed.

The following example shows the user-example1.yaml file:

apiVersion: user.enmasse.io/v1alpha1
kind: MessagingUser
metadata:
  name: myspace.user1
spec:
  username: user1
  authentication:
    type: password
    password: cGFzc3dvcmQ= # Base64 encoded
  authorization:
    - addresses: ["myqueue", "queue1", "queue2", "topic*"]
      operations: ["send", "recv"]
    - addresses: ["anycast1"]
      operations: ["send"]

The following fields are required:

  • metadata.name
  • metadata.namespace
  • spec.authentication
  • spec.authorization

The spec.authentication object defines how the user is authenticated, whereas spec.authorization defines the authorization policies for that user.

4.10.1. Authentication

The supported values for the authentication type are password and federated.

Note

In the default configuration, password authentication type users can only access messaging endpoints, whereas federated authentication type users can only access the AMQ Online Console.

4.10.1.1. Password authentication type

For the password type, an additional field password must be set to a base64-encoded value of the password for that user. The password will not be printed out when reading the resource.

A password can be base64-encoded on the command line. To encode my-password, for example:

$ echo -n my-password | base64
bXktcGFzc3dvcmQ=

4.10.1.2. Federated authentication type

For the federated type, the provider field must also be specified. The supported values depend on the identity providers configured for the address space. The federatedUsername and federatedUserid fields must be set, and must map to the username and userid in the federated identity provider.

4.10.2. Authorization

In addition, authorization policies can be defined using operations and addresses. Valid operations are send, recv, view, and manage. If addresses are not specified, operations will be applied to all addresses.

Additional resources

4.11. Managing users on OpenShift

AMQ Online user management is only supported when using the standard authentication service. On OpenShift, users can be managed using the OpenShift command-line tools.

Prerequisites

4.11.1. Creating users using the command line

In AMQ Online users can be created using standard command-line tools.

Prerequisites

Procedure

  1. Save the user definition to a file:

    apiVersion: user.enmasse.io/v1alpha1
    kind: MessagingUser
    metadata:
      name: myspace.user1
    spec:
      username: user1
      authentication:
        type: password
        password: cGFzc3dvcmQ= # Base64 encoded
      authorization:
        - addresses: ["myqueue", "queue1", "queue2", "topic*"]
          operations: ["send", "recv"]
        - addresses: ["anycast1"]
          operations: ["send"]
  2. Create the user and associated user permissions:

    oc create -f user-example1.yaml
  3. Confirm that the user was created:

    oc get messagingusers

Additional resources

4.11.2. Deleting users using the command line

Users can be deleted using standard command-line tools.

Prerequisites

  • An address space must have been created.
  • A user must have been created.

Procedure

  1. List the current users:

    oc get messagingusers
  2. Delete the desired user:

    oc delete messaginguser myspace.user1

Additional resources

4.11.3. Managing user permissions using the command line

You can edit the permissions for an existing user using the command line.

Prerequisites

Procedure

  1. Retrieve the user whose permissions you want to edit:

    oc get messaginguser myspace.user1 -o yaml > user1-example.yaml
  2. Make the desired permissions change and save the file.
  3. From the command line, run the following command to apply the change:

    oc apply -f user-example1.yaml

    The new user permissions are applied.

4.12. Connecting applications to AMQ Online

You can connect your application to AMQ Online using one of the following client examples.

To connect to the messaging service from outside the OpenShift cluster, TLS must be used with SNI set to specify the fully qualified host name for the address space. The port used is 443.

The messaging protocols supported depends on the type of address space used. For more information, see the address space section.

4.12.1. Client examples

4.12.1.1. AMQ Online Python example

You can use the following AMQ Online Python example to connect your application to AMQ Online. This example assumes you have created an address of type queue named myqueue.

from future import print_function, unicode_literals
from proton import Message
from proton.handlers import MessagingHandler
from proton.reactor import Container

class HelloWorld(MessagingHandler):
    def init(self, server, address):
        super(HelloWorld, self).init()
        self.server = server
        self.address = address

    def on_start(self, event):
        conn = event.container.connect(self.server)
        event.container.create_receiver(conn, self.address)
        event.container.create_sender(conn, self.address)

    def on_sendable(self, event):
        event.sender.send(Message(body="Hello World!"))
        event.sender.close()

    def on_message(self, event):
        print(event.message.body)
        event.connection.close()

Container(HelloWorld("amqps://messaging-route-hostname:443", "myqueue")).run()

4.12.1.2. AMQ Online JMS example

You can use the following AMQ Online JMS example to connect your application to AMQ Online. This example assumes you have created an address of type queue named myqueue.

package org.apache.qpid.jms.example;

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;

public class HelloWorld {
    public static void main(String[] args) throws Exception {
        try {
            // The configuration for the Qpid InitialContextFactory has been supplied in
            // a jndi.properties file in the classpath, which results in it being picked
            // up automatically by the InitialContext constructor.
            Context context = new InitialContext();

            ConnectionFactory factory = (ConnectionFactory) context.lookup("myFactoryLookup");
            Destination queue = (Destination) context.lookup("myQueueLookup");

            Connection connection = factory.createConnection(System.getProperty("USER"), System.getProperty("PASSWORD"));
            connection.setExceptionListener(new MyExceptionListener());
            connection.start();

            Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);

            MessageProducer messageProducer = session.createProducer(queue);
            MessageConsumer messageConsumer = session.createConsumer(queue);

            TextMessage message = session.createTextMessage("Hello world!");
            messageProducer.send(message, DeliveryMode.NON_PERSISTENT, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);
            TextMessage receivedMessage = (TextMessage) messageConsumer.receive(2000L);

            if (receivedMessage != null) {
                System.out.println(receivedMessage.getText());
            } else {
                System.out.println("No message received within the given timeout!");
            }

            connection.close();
        } catch (Exception exp) {
            System.out.println("Caught exception, exiting.");
            exp.printStackTrace(System.out);
            System.exit(1);
        }
    }

    private static class MyExceptionListener implements ExceptionListener {
        @Override
        public void onException(JMSException exception) {
            System.out.println("Connection ExceptionListener fired, exiting.");
            exception.printStackTrace(System.out);
            System.exit(1);
        }
    }
}

with jndi.properties:

connectionfactory.myFactoryLookup = amqps://messaging-route-hostname:443?transport.trustAll=true&transport.verifyHost=false
queue.myQueueLookup = myqueue

4.12.1.3. AMQ Online JavaScript example

You can use the following AMQ Online JavaScript example to connect your application to AMQ Online. This example assumes you have created an address of type queue named myqueue.

var container = require('rhea');
container.on('connection_open', function (context) {
    context.connection.open_receiver('myqueue');
    context.connection.open_sender('myqueue');
});
container.on('message', function (context) {
    console.log(context.message.body);
    context.connection.close();
});
container.on('sendable', function (context) {
    context.sender.send({body:'Hello World!'});
    context.sender.detach();
});
container.connect({username: 'username', password: 'password', port:443, host:'messaging-route-hostname', transport:'tls', rejectUnauthorized:false});
4.12.1.3.1. AMQ Online JavaScript example using WebSockets
var container = require('rhea');
var WebSocket = require('ws');

container.on('connection_open', function (context) {
    context.connection.open_receiver('myqueue');
    context.connection.open_sender('myqueue');
});
container.on('message', function (context) {
    console.log(context.message.body);
    context.connection.close();
});
container.on('sendable', function (context) {
    context.sender.send({body:'Hello World!'});
    context.sender.detach();
});

var ws = container.websocket_connect(WebSocket);
container.connect({username: 'username', password: 'password', connection_details: ws("wss://messaging-route-hostname:443", ["binary"], {rejectUnauthorized: false})});

4.12.1.4. AMQ Online C++ example

The C++ client has equivalent simple_recv and simple_send examples with the same options as Python. However, the C++ library does not perform the same level of processing on the URL; in particular it will not accept amqps:// to imply using TLS, so the example needs to be modified as follows:

#include <proton/connection.hpp>
#include <proton/container.hpp>
#include <proton/default_container.hpp>
#include <proton/delivery.hpp>
#include <proton/message.hpp>
#include <proton/messaging_handler.hpp>
#include <proton/ssl.hpp>
#include <proton/thread_safe.hpp>
#include <proton/tracker.hpp>
#include <proton/url.hpp>

#include <iostream>

#include "fake_cpp11.hpp"

class hello_world : public proton::messaging_handler {
  private:
    proton::url url;

  public:
    hello_world(const std::string& u) : url(u) {}

    void on_container_start(proton::container& c) OVERRIDE {
        proton::connection_options co;
        co.ssl_client_options(proton::ssl_client_options());
        c.client_connection_options(co);
        c.connect(url);
    }

    void on_connection_open(proton::connection& c) OVERRIDE {
        c.open_receiver(url.path());
        c.open_sender(url.path());
    }

    void on_sendable(proton::sender &s) OVERRIDE {
        proton::message m("Hello World!");
        s.send(m);
        s.close();
    }

    void on_message(proton::delivery &d, proton::message &m) OVERRIDE {
        std::cout << m.body() << std::endl;
        d.connection().close();
    }
};

int main(int argc, char **argv) {
    try {
        std::string url = argc > 1 ? argv[1] : "messaging-route-hostname:443/myqueue";

        hello_world hw(url);
        proton::default_container(hw).run();

        return 0;
    } catch (const std::exception& e) {
        std::cerr << e.what() << std::endl;
    }

    return 1;
}

4.12.1.5. AMQ Online .NET example

You can use the following AMQ Online .NET example to connect your application to AMQ Online. This example assumes you have created an address of type queue named myqueue.

using System;
using Amqp;

namespace Test
{
    public class Program
    {
        public static void Main(string[] args)
        {
            String url = (args.Length > 0) ? args[0] : "amqps://messaging-route-hostname:443";
            String address = (args.Length > 1) ? args[1] : "myqueue";

            Connection.DisableServerCertValidation = true;
            Connection connection = new Connection(new Address(url));
            Session session = new Session(connection);
            SenderLink sender = new SenderLink(session, "test-sender", address);

            Message messageSent = new Message("Test Message");
            sender.Send(messageSent);

            ReceiverLink receiver = new ReceiverLink(session, "test-receiver", address);
            Message messageReceived = receiver.Receive(TimeSpan.FromSeconds(2));
            Console.WriteLine(messageReceived.Body);
            receiver.Accept(messageReceived);

            sender.Close();
            receiver.Close();
            session.Close();
            connection.Close();
        }
    }
}

Appendix A. REST API Reference

A.1. EnMasse REST API

A.1.1. Overview

This is the EnMasse API specification.

A.1.1.1. Version information

Version : 1.0.0

A.1.1.2. URI scheme

Schemes : HTTPS

A.1.1.3. Tags

  • addresses : Operating on Addresses.
  • addressplans : Operating on AddressPlans.
  • addressspaceplans : Operating on AddressSpacePlans.
  • addressspaces : Operate on AddressSpaces
  • brokeredinfraconfigs : Operating on BrokeredInfraConfigs.
  • messagingusers : Operating on MessagingUsers.
  • standardinfraconfigs : Operating on StandardInfraConfigs.

A.1.1.4. External Docs

Description : Find out more about EnMasse
URL : http://enmasse.io

A.1.2. Paths

A.1.2.1. POST /apis/admin.enmasse.io/v1alpha1/namespaces/{namespace}/addressspaceplans

A.1.2.1.1. Description

create an AddressSpacePlan

A.1.2.1.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.admin.v1alpha1.AddressSpacePlan

A.1.2.1.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.admin.v1alpha1.AddressSpacePlan

201

Created

io.enmasse.admin.v1alpha1.AddressSpacePlan

401

Unauthorized

No Content

A.1.2.1.4. Consumes
  • application/json
A.1.2.1.5. Produces
  • application/json
A.1.2.1.6. Tags
  • addressspaceplan
  • admin
  • enmasse_v1alpha1

A.1.2.2. GET /apis/admin.enmasse.io/v1alpha1/namespaces/{namespace}/addressspaceplans

A.1.2.2.1. Description

list objects of kind AddressSpacePlan

A.1.2.2.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Query

labelSelector
optional

A selector to restrict the list of returned objects by their labels. Defaults to everything.

string

A.1.2.2.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.admin.v1alpha1.AddressSpacePlanList

401

Unauthorized

No Content

A.1.2.2.4. Produces
  • application/json
A.1.2.2.5. Tags
  • addressspaceplan
  • admin
  • enmasse_v1alpha1

A.1.2.3. GET /apis/admin.enmasse.io/v1alpha1/namespaces/{namespace}/addressspaceplans/{name}

A.1.2.3.1. Description

read the specified AddressSpacePlan

A.1.2.3.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of AddressSpacePlan to read.

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.3.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.admin.v1alpha1.AddressSpacePlan

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.3.4. Consumes
  • application/json
A.1.2.3.5. Produces
  • application/json
A.1.2.3.6. Tags
  • addressspaceplan
  • admin
  • enmasse_v1alpha1

A.1.2.4. PUT /apis/admin.enmasse.io/v1alpha1/namespaces/{namespace}/addressspaceplans/{name}

A.1.2.4.1. Description

replace the specified AddressSpacePlan

A.1.2.4.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of AddressSpacePlan to replace.

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.admin.v1alpha1.AddressSpacePlan

A.1.2.4.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.admin.v1alpha1.AddressSpacePlan

201

Created

io.enmasse.admin.v1alpha1.AddressSpacePlan

401

Unauthorized

No Content

A.1.2.4.4. Produces
  • application/json
A.1.2.4.5. Tags
  • addressspaceplan
  • admin
  • enmasse_v1alpha1

A.1.2.5. DELETE /apis/admin.enmasse.io/v1alpha1/namespaces/{namespace}/addressspaceplans/{name}

A.1.2.5.1. Description

delete an AddressSpacePlan

A.1.2.5.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of AddressSpacePlan to delete.

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.5.3. Responses
HTTP CodeDescriptionSchema

200

OK

Status

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.5.4. Produces
  • application/json
A.1.2.5.5. Tags
  • addressspaceplan
  • admin
  • enmasse_v1alpha1

A.1.2.6. POST /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addresses

A.1.2.6.1. Description

create an Address

A.1.2.6.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.v1alpha1.Address

A.1.2.6.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.Address

201

Created

io.enmasse.v1alpha1.Address

401

Unauthorized

No Content

A.1.2.6.4. Consumes
  • application/json
A.1.2.6.5. Produces
  • application/json
A.1.2.6.6. Tags
  • addresses
  • enmasse_v1alpha1

A.1.2.7. GET /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addresses

A.1.2.7.1. Description

list objects of kind Address

A.1.2.7.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Query

labelSelector
optional

A selector to restrict the list of returned objects by their labels. Defaults to everything.

string

A.1.2.7.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.AddressList

401

Unauthorized

No Content

A.1.2.7.4. Produces
  • application/json
A.1.2.7.5. Tags
  • addresses
  • enmasse_v1alpha1

A.1.2.8. GET /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addresses/{name}

A.1.2.8.1. Description

read the specified Address

A.1.2.8.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of Address to read

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.8.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.Address

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.8.4. Consumes
  • application/json
A.1.2.8.5. Produces
  • application/json
A.1.2.8.6. Tags
  • addresses
  • enmasse_v1alpha1

A.1.2.9. PUT /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addresses/{name}

A.1.2.9.1. Description

replace the specified Address

A.1.2.9.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of Address to replace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.v1alpha1.Address

A.1.2.9.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.Address

201

Created

io.enmasse.v1alpha1.Address

401

Unauthorized

No Content

A.1.2.9.4. Produces
  • application/json
A.1.2.9.5. Tags
  • addresses
  • enmasse_v1alpha1

A.1.2.10. DELETE /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addresses/{name}

A.1.2.10.1. Description

delete an Address

A.1.2.10.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of Address to delete

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.10.3. Responses
HTTP CodeDescriptionSchema

200

OK

Status

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.10.4. Produces
  • application/json
A.1.2.10.5. Tags
  • addresses
  • enmasse_v1alpha1

A.1.2.11. POST /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces

A.1.2.11.1. Description

create an AddressSpace

A.1.2.11.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.v1alpha1.AddressSpace

A.1.2.11.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.AddressSpace

201

Created

io.enmasse.v1alpha1.AddressSpace

401

Unauthorized

No Content

A.1.2.11.4. Consumes
  • application/json
A.1.2.11.5. Produces
  • application/json
A.1.2.11.6. Tags
  • addressspaces
  • enmasse_v1alpha1

A.1.2.12. GET /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces

A.1.2.12.1. Description

list objects of kind AddressSpace

A.1.2.12.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Query

labelSelector
optional

A selector to restrict the list of returned objects by their labels. Defaults to everything.

string

A.1.2.12.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.AddressSpaceList

401

Unauthorized

No Content

A.1.2.12.4. Produces
  • application/json
A.1.2.12.5. Tags
  • addressspaces
  • enmasse_v1alpha1

A.1.2.13. POST /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{addressSpace}/addresses

A.1.2.13.1. Description

create Addresses in an AddressSpace

A.1.2.13.2. Parameters
TypeNameDescriptionSchema

Path

addressSpace
required

Name of AddressSpace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

AddressList object

io.enmasse.v1alpha1.AddressList

A.1.2.13.3. Responses
HTTP CodeDescriptionSchema

200

OK

Status

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.13.4. Consumes
  • application/json
A.1.2.13.5. Produces
  • application/json
A.1.2.13.6. Tags
  • addressspace_addresses
  • enmasse_v1alpha1

A.1.2.14. GET /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{addressSpace}/addresses

A.1.2.14.1. Description

list objects of kind Address in AddressSpace

A.1.2.14.2. Parameters
TypeNameDescriptionSchema

Path

addressSpace
required

Name of AddressSpace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.14.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.AddressList

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.14.4. Produces
  • application/json
A.1.2.14.5. Tags
  • addressspace_addresses
  • enmasse_v1alpha1

A.1.2.15. GET /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{addressSpace}/addresses/{address}

A.1.2.15.1. Description

read the specified Address in AddressSpace

A.1.2.15.2. Parameters
TypeNameDescriptionSchema

Path

address
required

Name of Address

string

Path

addressSpace
required

Name of AddressSpace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.15.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.Address

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.15.4. Produces
  • application/json
A.1.2.15.5. Tags
  • addressspace_addresses
  • enmasse_v1alpha1

A.1.2.16. PUT /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{addressSpace}/addresses/{address}

A.1.2.16.1. Description

replace Address in an AddressSpace

A.1.2.16.2. Parameters
TypeNameDescriptionSchema

Path

address
required

Name of address

string

Path

addressSpace
required

Name of AddressSpace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

Address object

io.enmasse.v1alpha1.Address

A.1.2.16.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.Address

201

Created

io.enmasse.v1alpha1.Address

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.16.4. Consumes
  • application/json
A.1.2.16.5. Produces
  • application/json
A.1.2.16.6. Tags
  • addressspace_addresses
  • enmasse_v1alpha1

A.1.2.17. DELETE /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{addressSpace}/addresses/{address}

A.1.2.17.1. Description

delete an Address in AddressSpace

A.1.2.17.2. Parameters
TypeNameDescriptionSchema

Path

address
required

Name of Address

string

Path

addressSpace
required

Name of AddressSpace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.17.3. Responses
HTTP CodeDescriptionSchema

200

OK

Status

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.17.4. Produces
  • application/json
A.1.2.17.5. Tags
  • addressspace_addresses
  • enmasse_v1alpha1

A.1.2.18. GET /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{name}

A.1.2.18.1. Description

read the specified AddressSpace

A.1.2.18.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of AddressSpace to read

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.18.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.AddressSpace

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.18.4. Consumes
  • application/json
A.1.2.18.5. Produces
  • application/json
A.1.2.18.6. Tags
  • addressspaces
  • enmasse_v1alpha1

A.1.2.19. PUT /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{name}

A.1.2.19.1. Description

replace the specified AddressSpace

A.1.2.19.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of AddressSpace to replace

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.v1alpha1.AddressSpace

A.1.2.19.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.v1alpha1.AddressSpace

201

Created

io.enmasse.v1alpha1.AddressSpace

401

Unauthorized

No Content

A.1.2.19.4. Produces
  • application/json
A.1.2.19.5. Tags
  • addressspaces
  • enmasse_v1alpha1

A.1.2.20. DELETE /apis/enmasse.io/v1alpha1/namespaces/{namespace}/addressspaces/{name}

A.1.2.20.1. Description

delete an AddressSpace

A.1.2.20.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of AddressSpace to delete

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.20.3. Responses
HTTP CodeDescriptionSchema

200

OK

Status

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.20.4. Produces
  • application/json
A.1.2.20.5. Tags
  • addressspaces
  • enmasse_v1alpha1

A.1.2.21. POST /apis/user.enmasse.io/v1alpha1/namespaces/{namespace}/messagingusers

A.1.2.21.1. Description

create a MessagingUser

A.1.2.21.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.user.v1alpha1.MessagingUser

A.1.2.21.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.user.v1alpha1.MessagingUser

201

Created

io.enmasse.user.v1alpha1.MessagingUser

401

Unauthorized

No Content

A.1.2.21.4. Consumes
  • application/json
A.1.2.21.5. Produces
  • application/json
A.1.2.21.6. Tags
  • auth
  • enmasse_v1alpha1
  • user

A.1.2.22. GET /apis/user.enmasse.io/v1alpha1/namespaces/{namespace}/messagingusers

A.1.2.22.1. Description

list objects of kind MessagingUser

A.1.2.22.2. Parameters
TypeNameDescriptionSchema

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Query

labelSelector
optional

A selector to restrict the list of returned objects by their labels. Defaults to everything.

string

A.1.2.22.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.user.v1alpha1.MessagingUserList

401

Unauthorized

No Content

A.1.2.22.4. Produces
  • application/json
A.1.2.22.5. Tags
  • auth
  • enmasse_v1alpha1
  • user

A.1.2.23. GET /apis/user.enmasse.io/v1alpha1/namespaces/{namespace}/messagingusers/{name}

A.1.2.23.1. Description

read the specified MessagingUser

A.1.2.23.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of MessagingUser to read. Must include addressSpace and dot separator in the name (that is, 'myspace.user1').

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.23.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.user.v1alpha1.MessagingUser

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.23.4. Consumes
  • application/json
A.1.2.23.5. Produces
  • application/json
A.1.2.23.6. Tags
  • auth
  • enmasse_v1alpha1
  • user

A.1.2.24. PUT /apis/user.enmasse.io/v1alpha1/namespaces/{namespace}/messagingusers/{name}

A.1.2.24.1. Description

replace the specified MessagingUser

A.1.2.24.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of MessagingUser to replace. Must include addressSpace and dot separator in the name (that is, 'myspace.user1').

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

Body

body
required

 

io.enmasse.user.v1alpha1.MessagingUser

A.1.2.24.3. Responses
HTTP CodeDescriptionSchema

200

OK

io.enmasse.user.v1alpha1.MessagingUser

201

Created

io.enmasse.user.v1alpha1.MessagingUser

401

Unauthorized

No Content

A.1.2.24.4. Produces
  • application/json
A.1.2.24.5. Tags
  • auth
  • enmasse_v1alpha1
  • user

A.1.2.25. DELETE /apis/user.enmasse.io/v1alpha1/namespaces/{namespace}/messagingusers/{name}

A.1.2.25.1. Description

delete a MessagingUser

A.1.2.25.2. Parameters
TypeNameDescriptionSchema

Path

name
required

Name of MessagingUser to delete. Must include addressSpace and dot separator in the name (that is, 'myspace.user1').

string

Path

namespace
required

object name and auth scope, such as for teams and projects

string

A.1.2.25.3. Responses
HTTP CodeDescriptionSchema

200

OK

Status

401

Unauthorized

No Content

404

Not found

No Content

A.1.2.25.4. Produces
  • application/json
A.1.2.25.5. Tags
  • auth
  • enmasse_v1alpha1
  • user

A.1.3. Definitions

A.1.3.1. ObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

NameSchema

name
required

string

namespace
optional

string

A.1.3.2. Status

Status is a return value for calls that do not return other objects.

NameDescriptionSchema

code
optional

Suggested HTTP return code for this status, 0 if not set.

integer (int32)

A.1.3.3. io.enmasse.admin.v1alpha1.AddressPlan

NameSchema

addressType
required

string

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

displayName
required

string

displayOrder
required

integer

kind
required

enum (AddressPlan)

longDescription
optional

string

metadata
required

ObjectMeta

requiredResources
required

< requiredResources > array

shortDescription
required

string

uuid
required

string

requiredResources

NameSchema

credit
required

number

name
required

string

A.1.3.4. io.enmasse.admin.v1alpha1.AddressPlanList

NameSchema

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

items
required

< io.enmasse.admin.v1alpha1.AddressPlan > array

kind
required

enum (AddressPlanList)

A.1.3.5. io.enmasse.admin.v1alpha1.AddressSpacePlan

NameSchema

addressPlans
optional

< string > array

addressSpaceType
required

string

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

displayName
required

string

displayOrder
required

integer

kind
required

enum (AddressSpacePlan)

longDescription
optional

string

metadata
required

ObjectMeta

resources
required

< resources > array

shortDescription
required

string

uuid
required

string

resources

NameSchema

max
required

number

min
required

number

name
required

string

A.1.3.6. io.enmasse.admin.v1alpha1.AddressSpacePlanList

NameSchema

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

items
required

< io.enmasse.admin.v1alpha1.AddressSpacePlan > array

kind
required

enum (AddressSpacePlanList)

A.1.3.7. io.enmasse.admin.v1alpha1.BrokeredInfraConfig

NameSchema

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

kind
required

enum (BrokeredInfraConfig)

metadata
required

ObjectMeta

spec
required

io.enmasse.admin.v1alpha1.BrokeredInfraConfigSpec

A.1.3.8. io.enmasse.admin.v1alpha1.BrokeredInfraConfigList

NameSchema

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

items
required

< io.enmasse.admin.v1alpha1.BrokeredInfraConfig > array

kind
required

enum (BrokeredInfraConfigList)

A.1.3.9. io.enmasse.admin.v1alpha1.BrokeredInfraConfigSpec

A.1.3.10. io.enmasse.admin.v1alpha1.BrokeredInfraConfigSpecAdmin

NameSchema

resources
optional

resources

resources

NameSchema

memory
optional

string

A.1.3.11. io.enmasse.admin.v1alpha1.BrokeredInfraConfigSpecBroker

NameSchema

addressFullPolicy
optional

enum (PAGE, BLOCK, FAIL)

resources
optional

resources

resources

NameSchema

memory
optional

string

storage
optional

string

A.1.3.12. io.enmasse.admin.v1alpha1.StandardInfraConfig

NameSchema

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

kind
required

enum (StandardInfraConfig)

metadata
required

ObjectMeta

spec
required

io.enmasse.admin.v1alpha1.StandardInfraConfigSpec

A.1.3.13. io.enmasse.admin.v1alpha1.StandardInfraConfigList

NameSchema

apiVersion
required

enum (admin.enmasse.io/v1alpha1)

items
required

< io.enmasse.admin.v1alpha1.StandardInfraConfig > array

kind
required

enum (StandardInfraConfigList)

A.1.3.14. io.enmasse.admin.v1alpha1.StandardInfraConfigSpec

A.1.3.15. io.enmasse.admin.v1alpha1.StandardInfraConfigSpecAdmin

NameSchema

resources
optional

resources

resources

NameSchema

memory
optional

string

A.1.3.16. io.enmasse.admin.v1alpha1.StandardInfraConfigSpecBroker

NameSchema

addressFullPolicy
optional

enum (PAGE, BLOCK, FAIL)

resources
optional

resources

resources

NameSchema

memory
optional

string

storage
optional

string

A.1.3.17. io.enmasse.admin.v1alpha1.StandardInfraConfigSpecRouter

NameSchema

linkCapacity
optional

string

resources
optional

resources

resources

NameSchema

memory
optional

string

A.1.3.18. io.enmasse.user.v1alpha1.MessagingUser

NameSchema

apiVersion
required

enum (user.enmasse.io/v1alpha1)

kind
required

enum (MessagingUser)

metadata
required

ObjectMeta

spec
required

io.enmasse.user.v1alpha1.UserSpec

A.1.3.19. io.enmasse.user.v1alpha1.MessagingUserList

NameSchema

apiVersion
required

enum (user.enmasse.io/v1alpha1)

items
required

< io.enmasse.user.v1alpha1.MessagingUser > array

kind
required

enum (MessagingUserList)

A.1.3.20. io.enmasse.user.v1alpha1.UserSpec

NameSchema

authentication
optional

authentication

authorization
optional

< authorization > array

username
required

string

authentication

NameDescriptionSchema

federatedUserid
optional

User id of the user to federate when 'federated' type is specified.

string

federatedUsername
optional

User name of the user to federate when 'federated' type is specified.

string

password
optional

Base64 encoded value of password when 'password' type is specified.

string

provider
optional

Name of provider to use for federated identity when 'federated' type is specified.

string

type
required

 

enum (password, federated)

authorization

NameSchema

addresses
optional

< string > array

operations
required

< enum (send, receive, view, manage) > array

A.1.3.21. io.enmasse.v1alpha1.Address

NameSchema

apiVersion
required

enum (enmasse.io/v1alpha1)

kind
required

enum (Address)

metadata
required

ObjectMeta

spec
required

io.enmasse.v1alpha1.AddressSpec

status
optional

io.enmasse.v1alpha1.AddressStatus

A.1.3.22. io.enmasse.v1alpha1.AddressList

NameDescriptionSchema

apiVersion
required

Default : "enmasse.io/v1alpha1"

enum (enmasse.io/v1alpha1)

items
required

 

< io.enmasse.v1alpha1.Address > array

kind
required

 

enum (AddressList)

A.1.3.23. io.enmasse.v1alpha1.AddressSpace

NameSchema

apiVersion
required

enum (enmasse.io/v1alpha1)

kind
required

enum (AddressSpace)

metadata
required

ObjectMeta

spec
required

io.enmasse.v1alpha1.AddressSpaceSpec

status
optional

io.enmasse.v1alpha1.AddressSpaceStatus

A.1.3.24. io.enmasse.v1alpha1.AddressSpaceList

NameDescriptionSchema

apiVersion
required

Default : "enmasse.io/v1alpha1"

enum (enmasse.io/v1alpha1)

items
required

 

< io.enmasse.v1alpha1.AddressSpace > array

kind
required

 

enum (AddressSpaceList)

A.1.3.25. io.enmasse.v1alpha1.AddressSpaceSpec

NameSchema

authenticationService
optional

authenticationService

endpoints
optional

< endpoints > array

plan
required

string

type
required

io.enmasse.v1alpha1.AddressSpaceType

authenticationService

NameSchema

details
optional

object

type
optional

string

endpoints

NameSchema

cert
optional

cert

host
optional

string

name
optional

string

service
optional

string

servicePort
optional

string

cert

NameSchema

provider
optional

string

secretName
optional

string

A.1.3.26. io.enmasse.v1alpha1.AddressSpaceStatus

NameSchema

endpointStatuses
optional

< endpointStatuses > array

isReady
optional

boolean

messages
optional

< string > array

endpointStatuses

NameSchema

host
optional

string

name
optional

string

port
optional

integer

serviceHost
optional

string

servicePorts
optional

< servicePorts > array

servicePorts

NameSchema

name
optional

string

port
optional

integer

A.1.3.27. io.enmasse.v1alpha1.AddressSpaceType

AddressSpaceType is the type of address space (standard, brokered). Each type supports different types of addresses and semantics for those types.

Type : enum (standard, brokered)

A.1.3.28. io.enmasse.v1alpha1.AddressSpec

NameSchema

address
required

string

plan
required

string

type
required

io.enmasse.v1alpha1.AddressType

A.1.3.29. io.enmasse.v1alpha1.AddressStatus

NameSchema

isReady
optional

boolean

messages
optional

< string > array

phase
optional

enum (Pending, Configuring, Active, Failed, Terminating)

A.1.3.30. io.enmasse.v1alpha1.AddressType

Type of address (queue, topic, …). Each address type support different kinds of messaging semantics.

Type : enum (queue, topic, anycast, multicast)

Appendix B. Using your subscription

AMQ Online is provided through a software subscription. To manage your subscriptions, access your account at the Red Hat Customer Portal.

Accessing your account

  1. Go to access.redhat.com.
  2. If you do not already have an account, create one.
  3. Log in to your account.

Activating a subscription

  1. Go to access.redhat.com.
  2. Navigate to My Subscriptions.
  3. Navigate to Activate a subscription and enter your 16-digit activation number.

Downloading zip and tar files

To access zip or tar files, use the Red Hat Customer Portal to find the relevant files for download. If you are using RPM packages, this step is not required.

  1. Open a browser and log in to the Red Hat Customer Portal Product Downloads page at access.redhat.com/downloads.
  2. Locate the Red Hat AMQ Online entries in the JBOSS INTEGRATION AND AUTOMATION category.
  3. Select the desired AMQ Online product. The Software Downloads page opens.
  4. Click the Download link for your component.

Registering your system for packages

To install RPM packages on Red Hat Enterprise Linux, your system must be registered. If you are using zip or tar files, this step is not required.

  1. Go to access.redhat.com.
  2. Navigate to Registration Assistant.
  3. Select your OS version and continue to the next page.
  4. Use the listed command in your system terminal to complete the registration.

To learn more see How to Register and Subscribe a System to the Red Hat Customer Portal.

Legal Notice

Copyright © 2018 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.