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 8215539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:49:27+00:00 2026-06-07T11:49:27+00:00

By default, the activemq uses tcp protocol. But now, I change it to use

  • 0

By default, the activemq uses tcp protocol. But now, I change it to use ssl.

If I deploy the publisher and server on one machine, it makes no difference with regard to the speed. But after I deploy them on different machine, it’s much slower to use ssl than to use tcp. Is this normal? If not, what’s probably wrong with my code?

Thanks.

  • 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-07T11:49:31+00:00Added an answer on June 7, 2026 at 11:49 am

    Depends on how much slower your application is working.

    If you process huge amount of data volumes, SSL will take a decent amount of CPU cycles to encrypt (and also decrypt) the data. Is it the ActiveMQ server that is slower or is it the client. Profile the system setup to get an overview where to find the bottenecks.

    Another possibillity is frequent hand shakes. Say your client code (can you post it?) to send messages by opening a connection for each message, it might be the case that the latency for sending a message will suffer from the increased SSL handshake time compared to plain tcp.

    UPDATE:

    A speed up would be to reuse your connection. A SSL handshake has to be done for every message sent in your case which involves cpu expensive asymmetric crypto and a few more tcp roundtrips than plain TCP. It is easy to do, with the pooling connection factory provided by activemq. This example does not alter your code much:

    public class MySender{
     private static ConnectionFactory factory = new org.apache.activemq.pool.PooledConnectionFactory("ssl://192.168.0.111:61616");
     public void send(){
      Connection connection = factory.createConnection();
      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      Topic topic = session.createTopic(newDataEvent.getDataType().getType());
      MessageProducer producer = session.createProducer(topic);
      TextMessage message = session.createTextMessage();
      message.setText(xstream.toXML(newDataEvent));
      producer.send(message);
      session.close();
      connection.close(); 
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Default JVM uses maximum 1.5 GB RAM/JVM Java application. But my Server have 8
Default.aspx; <form id=form1 runat=server action=Default2.aspx method=post> <input type=checkbox name=change id=change/> </form> Default2.aspx.cs string ismultiple
The default Python on the server is 2.4, but Django needs version 2.5 or
default date format in DatePicker is yyyy-mm-dd but i need dd-mm-yyyy. This one solution
Default ASP.NET MVC project has one MapRoute like routes.MapRoute( Default, {controller}/, new { controller
By default, Visual Studio compiles a project to use the Multi Threaded DLL, found
By default, simple_form generates error messages in this form: <span class=error>error_text</span> but what i
By default dialog freezes whole screen but my requirement is when dialog appears then
Default, Windows controls don't have DoubleBuffer. When I use it, I can reduce flicker.
The default port is 1433, but somebody changed it in my hosting, how can

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.