Repository navigation
feat(keda): add ArtemisQueue scaler mapping - #6893
dhvani7014 wants to merge 2 commits into
Conversation
squakez
left a comment
There was a problem hiding this comment.
I think the main goal is to be able to discover the endpoint automatically. I think you can use a Pipe and see how it converts into an Integration DSL. From the Integration you can verify the camel parameters and map them into the scaler accordingly.
|
Thanks @squakez! I checked the Pipe → Integration conversion: the ArkMQ binding produces A few questions before I push:
|
It could be a good idea to also use application properties to extract mapping configuration. However it may require some change in the original architecture to pass a new map to the scaler. Feel free to provide some proposal. The host should be the one coming from the configuration (mind that it could even be an Integration, not only a Pipe). Any other parameter has to be recovered automatically from the Integration as well as credential if they are present. However, given this is a first implementation you may let the credentials setting out of the implementation. A good sample to get some inspiration is in the e2e Kafka scaler test. We should try to replicate the same logic, but using the new scaler instead. |
Fixes #6890
Adds a KEDA scaler mapping for ActiveMQ Artemis queues, following the keda-scaler contributing guide.
pkg/trait/keda/scalers/artemis.go: registers a mapper for theamqpcomponent (the URI ArkMQ bindings produce,amqp:queue:<name>). It maps the queue name toqueueNameandbrokerAddressfor the KEDAartemis-queuescaler. Topics are not mapped.managementEndpointandbrokerNamecan't be derived from the URI, so they are provided viakeda.autoMetadata.artemis_test.go: unit tests for registration, mapping, andMapToKedaTrigger, modelled onkafka_test.go.my-queuewithautoMetadata), and installed KEDA in the ArkMQ setup script.Tested locally with
go test ./pkg/trait/keda/... ./pkg/trait,gofmt, andgo vet -tags integration ./e2e/arkmq/. I couldn't run the e2e test locally.The e2e test checks the generated ScaledObject (auto-discovery + metadata merge), like the Kafka auto-discovery test. Happy to extend it to a full scale-up/scale-down test if you'd like.