Using ActiveMQ 5, is it possible to configure the broker with in memory and network connections?
We have a set of applications that I want to use JMS for messaging between. Right now, our applications all make TCP connections to the ActiveMQ broker. Is it possible to make the 15 or so applications that are on the same host use the inVM connections or use a form of shared memory while the remaining 20 or so applications that are off of that host use TCP still?
Basically, I want combine a broker configured with inVM and a broker configured with TCP. Can I do that, or do I have to do a bridge configuration?
Asked by: Nicole302 | Posted: 23-01-2022
Answer 1
The inVM connections only work if the applications are within the same JVM.
If they are on the same box but in different processes, then TCP is the best bet. Most operating systems will use efficient TCP implementations so that you are not actually going onto the network to communicate between the local processes.
Messaging is stream based, so shared memory doesn't really help with ActiveMQ. Its really just a choice of TCP or VM if your application is within the same JVM as the broker
Answered by: William165 | Posted: 24-02-2022Similar questions
java - How to configure ActiveMQ JCA connector in JBoss to use XA connections?
On JBoss 5.1.0 I have Datasource (PostgreSQL 8.3.11) configured using *-ds.xml (standard jboss DS). It uses XADataSource (PGXADataSource). I also have ActiveMQ broker (right now it runs as in-VM, under JBoss, but it will be on separate server latter).
What I want to do is to make ActiveMQ ...
java - I'm running a maven command for Jhipster fresh new project, and trying to configure the database connections, but it fails
The command:
mvn liquibase:diff -X
with mysql setting on jhipster fails on mac-os
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.3.2:diff (default-cli) on project jeces: Error setting up or running Liquibase: javax.persistence.PersistenceException: Unable to resolve persistence unit root URL: class path resource [] cannot be resolved to URL because i...
java - How to configure Quarkus to go beyond 20 Mysql connections?
I am unable to go beyond 20 Mysql connections, while working with Quarkus.
Here is the content of the application.properties file that is used:
quarkus.datasource.url=jdbc:mysql://localhost:3306/testdb?zeroDateTimeBehavior=convertToNull
quarkus.datasource.driver=com.mysql.cj.jdbc.Driver
quarkus.datasource.username =root
quarkus.datasource.password =
quarkus.http.test-port=38030
quarkus.http.port=3...
Does Java 6 open a default port for JMX remote connections?
My specific question has to do with JMX as used in JDK 1.6: if I am running a Java process using JRE 1.6 with
com.sun.management.jmxremote
in the command line, does Java pick a default port for remote JMX connections?
Backstory: I am currently trying to develop a procedure to give to a customer that will enable them to connect to one of our processes via JMX from a remote machine....
java - Pausing in between Retries of Network Connections
I'm writing an application for the JBoss Java EE server. I would like to have the DB-access code quite robust. Thus I have created retry loops so that the request won't fail because of temporary network problems. Now I would like the execution of the request to pause in between retries.
The server thread has been spawned by a request to an Axis Web Service. Is it safe to put the server thread to sleep or will I hav...
Can you make http client connections from a web app(flash, java)?
Before I jump both feet in and waste my time learning something that I can't use for my needs, I have to ask:
Can I make a http connection to another website from within a java applet or a flash file?
Say I have a java applet that wants to load results from google. Will the JVM give me access to such a call? What about Flash? I've read about URLLoader but am confused with the this:
" * Data load...
java - how to close hibernate tools db connections
When developing a new project I often want to re-create the schema to apply any new entities or relationships created. I like using hibernate tools in eclipse, but it's a pain when wanting drop and re-create the schema - since it seems to maintain open connections to the db (postgres in this case).
Does anybody know if there is an easy way of getting the eclipse hibernate tools plugin to close off all connections?
java - How to design a server with many persistent connections
I am designing a application where many clients connect to a central server. This server keeps these connections, sending keep-alives every half-hour. The server has a embedded HTTP server, which provides a interface to the client connections (ex. http://server/isClientConnected?id=id). I was wondering what is the best way to go about this. My cu...
java - Optimal number of connections in connection pool
Currently we are using 4 cpu windows box with 8gb RAM with MySQL 5.x installed on same box. We are using Weblogic application server for our application. We are targeting for 200 concurrent users for our application (Obviously not for same module/screen). So what is optimal number of connections should we configured in connection pool (min and max number) (We are using weblogic AS' connection pooling mechanism) ?
Need PHP or Java code to use multiple internet connections
I have a machine with Linux CentOS distribution that has more than one internet connection available at the same time.
I'm trying to write some PHP code that will do the following:
Perform an HTTP request to a specific URL "eg. google.com" but through a specific internet connection.
Perform the above for several internet connections at the same time (meaning several processes will be runnin...
java - Disabling Local JMX Connections on JVM
We are writing a java program which keeps a password in memory. Unfortunately, the user can easily use jconsole or jmap to create a heap dump file and open it to find the password. I think jconsole connects jvm using local sockets. I wanna know, is there any way to disable jmx even for local users? Is there any way to totally disable heap dumps? As the user have access to the memory segment, this is possible to access the ...
java - Websphere MQ using JMS, closed connections stuck on the MQ
I have a simple JMS application deployed on OC4J under AIX server, in my application I'm listening to some queues and sending to other queues on a Websphere MQ deployed under AS400 server.
The problem is that my connections to these queues are terminated/closed when it stays idle for some time with the error MQJMS1016 (this is not the problem), and when that happens I attempt to recove...
java - How do I decide the number of connections required in connection pooling?
I am using hibernate 3.2.2 in my application. For connection pooling, we are using c3p0 0.9.1.
I am using Generic DAO Pattern and Open Session in View pattern to do database operation.
We are working on new website of existing website. Right now, the no of visits is half million page visit in existing application. I am confused with the c3p0 configuration. At what benchmark, i decide the no of connection to be opene...
Still can't find your answer? Check out these amazing Java communities for help...
Java Reddit Community | Java Help Reddit Community | Dev.to Java Community | Java Discord | Java Programmers (Facebook) | Java developers (Facebook)