For testing purposes, I want to insert a message into the queue that is embedded on the WildFly server. I tried through JMeter but I'm not sure how to set it up.
My standalone settings for ActiveMQ Artemis:
<subsystem xmlns="urn:jboss:domain:messaging-activemq:14.0">
<server name="default">
<security enabled="false" elytron-domain="ApplicationDomain"/>
<statistics enabled="true"/>
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<in-vm-connector name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<remote-connector name="remote-artemis" socket-binding="remote-artemis"/>
<in-vm-acceptor name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-acceptor>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<jms-queue name="outgoing_audit" entries="queue/outgoing_audit java:jboss/exported/jms/queue/outgoing_audit"/>
<jms-queue name="site_node_outgoing" entries="queue/site_node_outgoing java:jboss/exported/jms/queue/site_node_outgoing"/>
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
</server>
</subsystem>
...
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="remote-artemis" port="5445"/>
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8081}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="${jboss.mail.server.host:localhost}" port="${jboss.mail.server.port:25}"/>
</outbound-socket-binding>
</socket-binding-group>
I tried to create a JMS Publisher profile in JMeter but I get Response message:
javax.naming.NamingException: javax.naming.NamingException: Invalid broker URL
Version of JMeter is 5.5. I added artemis-core-client-2.28.0.jar
to the lib
folder.
Is this a good version of JMeter and client or do some other settings need to be done?
I believe the configuration of your JMS Publisher in JMeter is incorrect. You appear to be using the JNDI configuration and library for standalone ActiveMQ Artemis. However, since the instance of ActiveMQ Artemis is embedded in WildFly you need to use a different configuration. Try this:
org.wildfly.naming.client.WildFlyInitialContextFactory
http-remoting://localhost:8080
jms/RemoteConnectionFactory
jms/queue/site_node_outgoing
Then copy the jboss-client.jar
jar from WildFly's bin/client
directory into JMeter's lib
directory, and remove artemis-core-client-2.28.0.jar
.