springboot with cluster of brokers #581
-
Hello, apiVersion: broker.amq.io/v1beta1 I can see 2 broker pods but only 1 services to port 61616: My application is a spring boot 3 app with spring-boot-starter-artemis dependency so my application.properties has this when i am running a single broker: Also, is there a way to change the name of the kubernetes services from activemq-artemis-broker-hdls-svc to something like "artemis-core-svc"? Asking because I have another standalone broker (not deployed by operator) running and it already has that service name so when i switch to operator i want to keep all the client unchanged. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
The operator automatically creates a service for each broker acceptors and you could use those services to build the url of your spring boot app.
Changing the acceptor name will fix this issue but I would recommend to use another acceptor port because 61616 is used also for internal purposes. The operator creates acceptor name using the following pattern the |
Beta Was this translation helpful? Give feedback.
-
Thank you. I removed the acceptors block from the config so that it is similar to the example https://artemiscloud.io/docs/tutorials/scaleup_and_scaledown/ and when i looked at the broker.xml in the broker pod i see: My question is more about how to config springboot client to use clusted of broker, do i need to specify all services for all broker or just the single service |
Beta Was this translation helpful? Give feedback.
-
thank you |
Beta Was this translation helpful? Give feedback.
-
Hello, is there a way to scale up the number of broker without changing the connection string on the client side? |
Beta Was this translation helpful? Give feedback.
The operator automatically creates a service for each broker acceptors and you could use those services to build the url of your spring boot app, i.e. the operator will create 2 services for the core-acceptor, one for each broker instance defined in the following CR: