Publishing messages on HornetQ using JMeter - jmeter

I'm developing a project wich is using HornetQ, and I want to publish some messages on it to execute a load test using JMeter. Does anyone here ever tried anything like it?
How can I configure JMeter to publish messages on HornetQ?
I already copied all the jars to the JMeter lib and filled all the fields on the "JMS Publisher Sampler". How can I proceed? Any example or JMX file which I could use as an example?

Add HornetQ JARs to jmeter/lib folder
Then for configuration of JMS Sampler use this:
http://docs.jboss.org/hornetq/2.2.5.Final/user-manual/en/html/using-jms.html

Related

Is there any reference Document for Integrating Citrus frame work with Jmeter

Hi I want to do Load test for JMS MQ using Citrus frame work integrating with Jmeter for performance test.Is there any document please refer me.
Thank You.
Why don't you test your MQ Series directlty with JMeter without using Citrus Framework? JMeter Plugins are available for this use case (Jmeter to connect to IBM MQ).
List item
1.Initially, We have to run JMS loadtest script in jmeter and if it works fine we have to save that Script in .JMX (example:jmsloadtest.jmx)
2.By invoking that .jmx file using java we can execute load test without using Jmeter.
for referenceinvoking .jmx file with java
3.Now we can use this class as a function in citrus frame work.for that have follow custom functions in citrus framework document.
Thank you.

PACT: java-maven

I need few answer for my doubt:
Pact-mock-service Vs pact-jvm-server, is both are same? Pls describe this.
Am implementing the PACT in java-maven
I can able to run this:
https://github.com/anha1/microservices-pact-maven
https://github.com/warmuuh/pactbroker-maven-plugin
Help me to understand this with pact-mock-service and pact-jvm-server
Pact-mock-service is a general mock server built into the pact libraries to support mocking out the other dependency in an integration during a consumer test. If you use any of the consumer test support libraries, you do not need to use it directly.
pact-jvm-server is a controllable server that bundles the Pact-mock-service and allows you to setup and tear down mock servers via HTTP requests. It exists for people who can not,or do not wish to use the consumer test support libraries.
For people using Maven, there is a plugin provided as part of the pact-jvm project that can do provider verification tests and publish to a pact broker. For the consumer tests, they just run as JUnit tests so you don't need any Maven specific plugin.
Of the two links you posted, the first is an example project using a spring-boot application, and the second is a maven plugin that provides publishing to a pact broker only.

Can i use .rar file in class path for a standalone Java program to pick up?

I have a standalone Java program which sends a message to MQ and receives a message. I need to use the wmq.jmsra.rar which has 10+ jar files in it. It works fine, if I unzip the rar and use jars in the classpath. I was wondering whether there is a way i can use this .rar file directly instead of unzipping it and adding each jar into classpath or adding the folder to classpath.
My question is related to this, but different... Is it correct or incorrect for a Java JAR to contain its own dependencies?
Thanks
Jugunu
The Resource Adapter (wmq.jmsra.rar) should be used when configuring a JavaEE application server. Details on getting that are at http://www-01.ibm.com/support/docview.wss?uid=swg21633761
Please don't unzip this to get at the component parts; instead use the MQ Classes for JMS 'allclient' jar or the OSGi bundles. Information on how to get those are available at http://www-01.ibm.com/support/docview.wss?uid=swg21683398
Those technotes give information for the latest releases. The 'allclient' is a v8 statement only - however installation of the client support packs (eg MQC75) will give you access to the JMS client.

JMeter with Custom Java Code

I am new to JMeter and trying out certain sample code as part of my POC's. My requirement is pretty simple, I just need to attach a zip file to a SOAP message and fire the request. But to create the SOAP message we already have a framework that needs to be used. Now the problem I am facing is to include the framework JARs. I tried to add the library files into the project and create a JAR and paste it in /lib/ext folder and also by putting them in the class path. None of this works.
How do you use any existing framework JARs with the custom code you write for JMeter??
Drop your jar to /lib folder of your JMeter installation
Restart JMeter. JMeter doesn't pick up new libraries or configuration file changes dynamically.
In Beanshell or JSR223 Sampler refer to your jar classes as:
import com.yourcompany.package.SomeClass;
import com.yourcompany.package.SomeMessage;
SomeClass myClass = new SomeClass(parameter1, parameter2);
SomeMessage message = myClass.createMessage();
message.send();
See WebSocket Testing With Apache JMeter guide as an example of using external jars in JMeter.

Can I use Spring Integration as a daemon in order to poll a directory?

I am new to Spring Integration and I am considering using it in order to poll a directory for new files in order to process those files.
My question is: is Spring Integration some sort of daemon one can launch and that one can use in order to poll a directory?
Is this is possible can someone please direct me to relevant section of the official documentation on how to launch Spring Integration?
All you need is to have a main method (or a WAR file if you want to deploy to Tomcat or another servlet container) that creates a Spring ApplicationContext (e.g. new ClassPathXmlApplicationContext("file-poller.xml"))
It can run with a cron trigger, fixed-rate or fixed-delay trigger.
JMX operations can be exposed on Spring Integration's File adapter (or any adapter) by simply adding a single config element (e.g. <mbean-export>).
Bottom line: you REALLY do not need an ESB if you simply want a File poller to run continuously. You can have a single small config file and one line of code in a main method.
Visit the samples for more info: https://github.com/springsource/spring-integration-samples (look under basic/file specifically)
Hope that helps,
Mark
Spring Integration is a part of framework, its not a programm or daemon.
What you cant do — is to configure Spring Integration to poll a directory, lunch JVM with Spring onboard and poller will do what you want.
You can start with this blog post.
More samples
Relevant section of documentation

Resources