I'm not aware of any way to specify a "context" on the client's connection URL. Furthermore, I don't how the broker would be configured to handle the context and provide different behavior between different contexts.
Can you clarify your use-case here? Why exactly do you want/need to use a "context" on the client's connection URL? What difference do you want it to make when actually connecting to the broker? It's worth noting that the URL here is just a way to configure the client's connection. Under the covers the connection is a standard TCP connection. A "context" doesn't really have any protocol-level meaning here like it would in, for example, HTTP. Justin On Thu, Apr 20, 2023 at 5:35 AM Bögershausen, Merlin < merlin.boegershau...@rwth-aachen.de> wrote: > Hi ActiveMQ Users, > we use an ActiveMQ deployed on JBoss 7.4 as Messaging Broker for JMS > Messages. We have a requirement that the ActiveMQ is reachable under a > Context, let’s say ‘jms’ so for example “tcp://localhost:8080/jms”. > We use org.apache.activemq:artemis-jms-client:2.19.1 to connect our Java > Application to Artemis with the configuration : > ```java > var conectionFactory = new > ActiveMQConnectionFactory(“tcp://localhost:8080/jms”); > ``` > Within the constructor of ActiveMQConnectionFactory the methode > ActiveMQConnectionFactory#setBrokerURL is called which forwards > “tcp://localhost:8080/jms” to ServerLocatorImpl#newLocator. From here the > context ‘jms’ is missing, and the connections are opened against > “tcp://localhost:8080/”. > > Is there any Build-in way to archive a connection against a context, do we > have to implement our own ServerLocator or is it impossible to connect > against a context? > > Best Merlin >