Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8116045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:41:20+00:00 2026-06-06T03:41:20+00:00

I have two programs, the first is a producer: public class Producer { public

  • 0

I have two programs, the first is a producer:

public class Producer {
    public static void main(String[] args) throws Exception {
        final ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:12345");
        final Connection c = cf.createConnection();
        final Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
        final TextMessage msg = s.createTextMessage("rho " + new Date().toString());
        final MessageProducer p = s.createProducer(new ActiveMQQueue("rmannibucau"));
        p.send(msg);
        p.close();
        s.close();
        c.close();
        }
}

and the second is a consumer:

public class Listener {
    public static void main(String[] args) throws Exception {
        final ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:12345");
        final Connection c = cf.createConnection();
        final Session s = c.createSession(false, Session.AUTO_ACKNOWLEDGE);
        s.createConsumer(s.createQueue("rmannibucau")).setMessageListener(new MessageListener() {

        @Override
        public void onMessage(Message message) {
            System.out.println(message.toString());
        }
    });

    c.start();
    s.run();
    }
}

I use ActiveMQ, java, jms and I want to test with Jmetter to know how much message consumer can consume in 1 minute, help me please.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T03:41:23+00:00Added an answer on June 6, 2026 at 3:41 am

    You’re going to need to create some sort of Custom Java Sampler. When creating one of these, you can call your code from inside, set start/end timers, if the request was successful/failed etc. Then, you put this jar into JMeter and it will appear as a Java Sampler. From here, you can use all of JMeter’s functionality to specify users, requests, time limit, etc.

    I hope this is enough of a start to help you out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two programs which are accessing a directory using the .NET Directory class
I have two programs- First one being a C program that writes in to
I have two simple programs that use named pipes, here is the first: int
I have two console programs (ex. first - client, second - server). Do Windows
Below are 2 programs First #include<stdio.h> void main() { int a[5]={1,2,3,4,5}; int *p; p=&a;
I have created two JSP programs as follows. First One: Addmulti.jsp <html> <head><title>Upload Excel
i have two programs working on the same file i want the first program
I have two forms. The first form Main has 2 buttons and a link
I have two scripts that are called in one program, the first script creates
I have to make an uninformed search (Breadth-first-Search) program which takes two nodes and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.