ActiveMQ Bridge
The ActiveMQ Bridge microservice provides bi-directional communication between ActiveMQ and configured Apache Pulsar topics.
This microservice is a supporting microservice that can participate in any microservice pipeline. See Understanding Microservice Pipelines in Unified Assurance Concepts for conceptual information about microservice pipelines.
Autoscaling is enabled by default for this microservice. You can optionally disable autoscaling when you deploy the microservice. See Configuring Autoscaling.
You can enable redundancy for this microservice when you deploy it. See Configuring Microservice Redundancy for general information.
This microservice provides additional Prometheus monitoring metrics. See ActiveMQ Bridge Self-Monitoring Metrics.
Active MQ Bridge Prerequisites
-
A microservice cluster is set up. See Microservice Cluster Setup.
-
The Pulsar microservice is deployed. See Pulsar.
-
If you are using custom credentials or custom certificates, you have created the appropriate Kubernetes secrets:
-
For custom certificates, create two cert files, one for the keystore path, and one for the keystore password, by running the following command as the assure1 user:
a1k create secret generic activemq-cert-secret --from-file=client.ts --from-file=tspassword.txt --from-file=client.ks --from-file=kspassword.txt -n $NAMESPACE
-
For custom credentials, create one cred file with lines for the ActiveMQ username and password by running the following command as the assure1 user:
a1k create secret generic activemq-cred-secret --from-file=Cred.txt -n $NAMESPACE
-
Deploying ActiveMQ Bridge
To deploy the microservice, run the following commands:
su - assure1
export NAMESPACE=<namespace>
export WEBFQDN=<WebFQDN>
a1helm install <microservice-release-name> assure1/activemq-bridge -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
In the commands:
-
<namespace> is the namespace where you are deploying the microservice. The default namespace is a1-zone1-pri, but you can change the zone number and, when deploying to a redundant cluster, change pri to sec.
-
<WebFQDN> is the fully-qualified domain name of the primary presentation server for the cluster.
-
<microservice-release-name> is the name to use for the microservice instance. Oracle recommends using the microservice name (activemq-bridge) unless you are deploying multiple instances of the microservice to the same cluster.
You can also use the Unified Assurance UI to deploy microservices. See Deploying a Microservice by Using the UI for more information.
Changing ActiveMQ Bridge Configuration Parameters
When running the install command, you can optionally change default configuration parameter values by including them in the command with additional --set arguments. You can add as many additional --set arguments as you need.
For example:
-
Set a parameter described in Default ActiveMQ Bridge Configuration by adding --set configData.<parameter_name>=<parameter_value>. For example, --set configData.LOG_LEVEL=DEBUG.
-
Enable redundancy for the microservice by adding --set redundancy.enabled=true.
-
Disable autoscaling for the microservice by adding --set autoscaling.enabled=false.
-
Set an autoscaling parameter described in ActiveMQ Bridge Autoscaling Configuration by adding --set autoscaling.<parameter_name>=<parameter_value>. For example, --set autoscaling.thresholds.backlogSize=300.
Default ActiveMQ Bridge Configuration
The following table describes the default configuration parameters found in the Helm chart under configData for the microservice.
Name | Default Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | Logging level used by application. |
ACTIVEMQ_HOST | "tcp://example.com:1663" | Text | The ActiveMQ host name. Supported protocols are tcp and stomp. |
OUTPUT_TOPIC_PULSAR | "persistent://assure1/event/test" | Text | The Pulsar topic to send alarms to. |
INPUT_TOPIC_PULSAR | "persistent://assure1/event/testInput" | Text | The Pulsar topic to read alarms from. |
INPUT_TOPIC_ACTIVEMQ | "/topic/testInput" | Text | The ActiveMQ topic to read alarms from. |
OUTPUT_TOPIC_ACTIVEMQ | "/topic/testOutput" | Text | The ActiveMQ topic to send alarms to. |
ACTIVEMQ_CLIENT_ID | "" | Text | The ActiveMQ client ID to use if the connection needs to be created with an existing connection. If you set this, you must also disable autoscaling. |
ACTIVEMQ_CLIENT_ID_FILE | "clientId.txt" | Text | The file to persist the client ID in. |
USE_TLS | "false" | Boolean | Whether to use TLS certificates (true) or Unified Assurance certificates (false) to log in to the ActiveMQ client. |
CUSTOM_TLS | "false" | Boolean | Whether to use custom certificates (true) or Unified Assurance certificates (false). |
ACTIVEMQ_CERT_SECRET_NAME_OVERRIDE | "activemq-cert-secret" | Text | When CUSTOM_TLS is set to true, the certificate secret name. |
ACTIVEMQ_CUSTOM_KS_FILE | "client.ks" | Text | When CUSTOM_TLS is set to true, the custom keystore file name. |
ACTIVEMQ_CUSTOM_KS_PWD_FILE | "kspassword.txt" | Text | When CUSTOM_TLS is set to true, the custom key store's password file. |
ACTIVEMQ_CUSTOM_TS_FILE | "client.ts" | Text | When CUSTOM_TLS is set to true, the custom trust store file name. |
ACTIVEMQ_CUSTOM_TS_PWD_FILE | "tspassword.txt" | Text | When CUSTOM_TLS is set to true, the custom trust store's password file. |
USE_CUSTOM_CRED | "false" | Boolean | Whether to use custom credentials (true) to log in to the ActiveMQ client. |
ACTIVEMQ_CRED_SECRET_NAME_OVERRIDE | "activemq-cred-secret" | Text | When USE_CUSTOM_CRED is set to true, the credentials secret name. |
ACTIVEMQ_CUSTOM_CRED_FILE | "cred.txt" | Text | When USE_CUSTOM_CRED is set to true, the custom username and password file name. The file should have the base64 encoded values for username in the first line and password in the second line. |
REDUNDANCY_POLL_PERIOD | 5s | Integer + Text (ns, us, µs, ms, s, m, h) | The amount of time between status checks from the secondary microservice to the primary microservice. |
REDUNDANCY_FAILOVER_THRESHOLD | 4 | Integer, greater than 0 | The number of times the primary microservice must fail checks before the secondary microservice becomes active. |
REDUNDANCY_FALLBACK_THRESHOLD | 1 | Integer, greater than 0 | The number of times the primary microservice must succeed checks before the secondary microservice becomes inactive. |
ActiveMQ Bridge Autoscaling Configuration
Autoscaling is supported for the ActiveMQ Bridge microservice. See Configuring Autoscaling for general information and details about the standard autoscaling configurations.
The ActiveMQ Bridge microservice also supports the additional configurations described in the following table.
Name | Default Value | Possible Values | Notes |
---|---|---|---|
thresholds.backlogSize | 400 | Integer | The number of items that need to be in the backlog before the autoscaling starts additional processes. |
thresholds.totalItemsProcessedAMQ | 400 | Integer | Total alarms processed by the microservice. If the average of total alarms processed in one minute exceeds the threshold, pods will be scaled. |
ActiveMQ Bridge Self-Monitoring Metrics
The ActiveMQ Bridge microservice exposes the self-monitoring metrics described in the following table to Prometheus.
Metric Name | Type | Description |
---|---|---|
AMQBridge_pulsar_to_amq_total_alarms_processed | Counter | Number of alarms processed, from Pulsar to ActiveMQ. |
AMQBridge_amq_to_pulsar_total_alarms_processed | Counter | Number of alarms processed, from ActiveMQ to Pulsar |
Note:
Metric names in the database include a prefix that indicates the service that inserted them. The prefix is prom_ for metrics inserted by Prometheus. For example, AMQBridge_pulsar_to_amq_total_alarms_processed is stored as prom_AMQBridge_pulsar_to_amq_total_alarms_processed in the database.