ansh0014 commented on issue #6452:
URL: https://github.com/apache/camel-k/issues/6452#issuecomment-6313593529
Hi @squakez ,
I have read through the newly added KEDA scaler contributor guide
(`keda-scaler.adoc`) and would like to work on this issue.
Before starting implementation, here is my proposed design for both scalers:
---
### 1. ActiveMQ Scaler (`activemq.go`)
- **Camel Component**: `activemq`
- **KEDA Scaler Type**: `activemq`
- **URI Mapping**:
- `pathValue` (e.g., `activemq:orders` or `activemq:queue:orders`)
$\rightarrow$ maps to `destinationName` (stripping leading `queue:` prefix).
- Query parameters (if provided in URI):
- `managementEndpoint` $\rightarrow$ `managementEndpoint`
- `brokerName` $\rightarrow$ `brokerName`
- `targetQueueSize` $\rightarrow$ `targetQueueSize`
- Required fields not present in the Camel URI can be supplied via
`keda.autoMetadata`.
---
### 2. ActiveMQ Artemis Scaler (`artemis.go`)
- **Camel Component**: `artemis` (and alias `activemq-artemis`)
- **KEDA Scaler Type**: `artemis-queue`
- **URI Mapping**:
- `pathValue` (e.g., `artemis:orders` or `artemis:queue:orders`)
$\rightarrow$ maps to `queueName` (stripping leading `queue:` prefix).
- `brokerAddress` $\rightarrow$ defaults to `queueName` unless explicitly
specified in query parameters.
- Query parameters (if provided in URI):
- `managementEndpoint` $\rightarrow$ `managementEndpoint`
- `brokerName` $\rightarrow$ `brokerName`
- `queueLength` $\rightarrow$ `queueLength`
- Fallback fields supplied via `keda.autoMetadata`.
---
### 3. Testing & Verification
- Add comprehensive unit tests in `pkg/trait/keda/scalers/activemq_test.go`
and `artemis_test.go` modeled after `kafka_test.go` (covering registration,
full URI mapping, minimal URI mapping, and `MapToKedaTrigger`).
- Run the full suite with `go test ./pkg/trait/keda/... ./pkg/trait`.
Does this approach look good to you? If so, please assign the issue to me
and I will submit a PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]