We have a setup of JBoss EAP 7.0.0.GA connecting to ActivMQ apache-activemq-5.14.3. We are trying to setup a durable subscriber with the following configuration:
@MessageDriven(
name = "TestListener",
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Topic"),
@ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "Durable"),
@ActivationConfigProperty(propertyName = "subscriptionName",
propertyValue = "subscriptionNameTest"),
@ActivationConfigProperty(propertyName = "clientId",
propertyValue = "2"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "jms/testTopic")
}
)
@PermitAll
@ResourceAdapter(value="activemq-rar.rar")
However, we are getting the following exception in the JBoss server console
ERROR [org.apache.activemq.ra.ActiveMQEndpointWorker] (default-threads - 4) Failed to connect to broker [tcp://127.0.0.1:61616?jms.rmIdFromConnectionId=true]: Broker: TestBroker - Client: 2 already connected from tcp://127.0.0.1:64246: javax.jms.InvalidClientIDException: Broker: TestBroker - Client: 2 already connected from tcp://127.0.0.1:64246
At the same time if we see the following logs at the activmq :
WARN | Failed to add Connection ID: 40600-51:1 due to javax.jms.InvalidClientIDException: Broker: TestBroker - Client: 2 already connected from tcp://127.0.0.1:64246 | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: tcp:///127.0.0.1:50170@61616
The ActiveMQManagedConnectionFactory settings are as follows (tried setting the max-pool-size to 1, but to no effect):
/subsystem=resource-adapters/resource-adapter=activemq-rar.rar/connection-definitions=ConnectionFactory:add(class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory", jndi-name="java:/MyConnectionFactory", enabled=true, min-pool-size=1, max-pool-size=20, pool-prefill=false, same-rm-override=false, recovery-username=ejb_user, recovery-password=xxxxx)
Request help from AMQ experts please.