ActiveMQ Artemis Click here for latest

Scale applications based on ActiveMQ Artemis queues

Availability: v1.5+ Maintainer: Community

Warning

You are currently viewing v"1.5" of the documentation and it is not the latest. For the most recent documentation, kindly click here.

Trigger Specification

This specification describes the artemis-queue trigger for ActiveMQ Artemis queues.

triggers:
- type: artemis-queue
  metadata:
    managementEndpoint: "artemis-activemq.artemis:8161"
    queueName: "test"
    brokerName: "artemis-activemq"
    brokerAddress: "test"
    queueLength: '10'
    username: 'ARTEMIS_USERNAME'
    password: 'ARTEMIS_PASSWORD'

Parameter list:

  • managementEndpoint - “hostname:port” to connect to ActiveMQ Artemis management endpoint.
  • queueName - Name of the queue to check for the number of messages available.
  • brokerName - Name of the broker as defined in Artemis.
  • brokerAddress - Address name of the broker.
  • queueLength - How much messages are in the queue. (Default: 10, Optional.)

Authentication Parameters

You can use TriggerAuthentication CRD to configure the username and password to connect to the management endpoint.

Username and Password based authentication:

  • username - The username to use to connect to the broker’s management endpoint.
  • password - The password to use to connect to the broker’s management endpoint.

Example

apiVersion: v1
kind: Secret
metadata:
  name: kedartemis
  namespace: kedartemis
  labels:
    app: kedartemis
type: Opaque
data:
  artemis-password: "YXJ0ZW1pcw=="
  artemis-username: "YXJ0ZW1pcw=="
---
apiVersion: keda.k8s.io/v1alpha1
kind: TriggerAuthentication
metadata:
  name: trigger-auth-kedartemis
  namespace: kedartemis
spec:
  secretTargetRef:
    - parameter: username
      name: kedartemis
      key: artemis-username
    - parameter: password
      name: kedartemis
      key: artemis-password
---
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
  name: kedartemis-consumer-scaled-object
  namespace: kedartemis
  labels:
    deploymentName: kedartemis-consumer
spec:
  scaleTargetRef:
    deploymentName: kedartemis-consumer
  triggers:
    - type: artemis-queue
      metadata:
        managementEndpoint: "artemis-activemq.artemis:8161"
        queueName: "test"
        queueLength: "50"
        brokerName: "artemis-activemq"
        brokerAddress: "test"
      authenticationRef:
        name: trigger-auth-kedartemis