ActiveMQ CLIENT on Java 1.4 - java

We are using Active MQ in the most current version 5.6.0.
Now we have the problem that a new client has to be connected, unfortunately this client is developed with IBM JDK 1.4. Adding ActiveMQ to the application lead to the following error:
UNEXPECTED ERROR OCCURRED: org/apache/activemq/ActiveMQConnectionFactory (Unsupported major.minor version 50.0)
STACK TRACE:
java.lang.UnsupportedClassVersionError: org/apache/activemq/ActiveMQConnectionFactory (Unsupported major.minor version 50.0)
We don't want to switch to an older ActiveMQ version, since there are other applications using the current version. Now my questions (I know the FAQ and especially http://activemq.apache.org/can-i-use-activemq-5x-or-later-on-java-14.html):
Are there any ActiveMQ client jars which are usable to connect to Active MQ 5.6.0?
For example is it possible to use an ActiveMQ 4.0 client to connect to Active MQ 5.6.0?
Is it possible to use any other protocol for this purpose? Has anyone a succesful solution running?
If I have to use retrotranslator which is the minimum set on jars I have to translate? Has anyone the experience with IBM JDK 1.4?
Thanks for your answers!

You can connect from STOMP to the ActiveMQ broker, or you can use an older AMQ 5.x client and connect. You can of course try an older 4.x client but its not really recommended. Version 5 clients should be able to connect without much problem however anytime you use an older client you are subject to the issues that are contained in those clients that were fixed in newer releases.

You might try to build ActiveMQ yourself (or STOMP), from source, using the -target 1.4 command line option, and addressing other cross-compile concerns. Since you have 1.4 libraries available, you should be able to use those in the bootclasspath for the cross-compile.
Cross your fingers, and you may get lucky by not having any hard dependencies on new library elements (nio). Or you might find ways to work around them.

Related

Use Java 7 Kafka client to communicate with remote Kafka broker running Java 8

Can we access Kafka installed on other machine using java7 in our system?
I have to fetch the topics by writing a consumer code but i have java7 in my system.
I know for installation we require minimum of java8.
Is there a reason you can't upgrade to Java 11 (or at least Java 8)?
Java 7 is totally unsupported and may contain unfixed security vulnerabilities.
If you still can't upgrade to at least Java 8, you will need to use a version of Kafka Clients that was compiled with Java 7. The latest such version was 1.1.1, available from the following Maven Central location:
'org.apache.kafka:kafka-clients:1.1.1'
This is an old version of Kafka Client that will be unable to take advantage of the latest features of Kafka.

ActiveMQ HTTP transport protocol not able to create ActiveMQSession on Java 8

I was using ActiveMQ 5.9.0 using HTTP transport protocol with Java 7. After I migrate from Java 7 to Java 8, my producer program is not able to create session to the broker. It keeps on trying to get the ActiveMQSession.
That version is very old and likely will have several issues with Java 8 not just in HTTP transport but other areas as well. The version of Jetty used in that broker is definitely not Java 8 compatible, you need to move to the latest release v5.14.2 which should work under Java 8 although the official Java 8 supported broker is the next major release v5.15.0

GAE: MQTT broker

So I was wondering if it's possible to run a MQTT broker on the Google App Engine platform?
Couldn't find any information about it (or maybe I might be using the wrong keywords).
I've got my GAE running on Java so I'd like to go into direction of running the MQTT broker on GAE using a backend.
EDIT:
Did some further research and it seems Moquette is running on Java. Does someone have experience running Moquette on the GAE?
EDIT2:
Ok, it seems the examples of Moquette are running using an OSGi container, which is unavailble in GAE. Looking for a script to start this server on GAE.
MQTT is protocol on top of TCP. In order to run MQTT server, one needs to be able to open a listening socket. Those are still not supported on normal AppEngine instances.
Note: GAE backends have been replaced: now you just have automatic scaled (aka frontend) instances and manual scaled (aka backend) instances.
Back to your problem: Managed VMs have most of the benefits of GAE (access to services), but run a full JVM, which allows listening sockets.
An alternative to Moquette would also be the HiveMQ broker, it also runs on Java and can be easily installed. All the documentation is available here.
We haven't tested it on GAE yet, but if you have any problems running it, you could ask in the support forum.
Update: If Peter Knego is right, then HiveMQ or any other MQTT broker won't work on GAE.
Full disclose: I'm working for the company, who develops HiveMQ.
Cheers,
Christian
#Peter Knego is definitely right, and all i would add to his answer is that,
If you manage to configure you application to use a custom Runtime on the Managed Vms of Appengine and Compute Engine,
then you will be able to run you MQTT brooker perfectly sound and well.
As long as you define a fire wall to allow a tcp connection at the port which your broker is listening from.
By default the ports are blocked for security reasons.

Getting ZooKeeper server version via Java API

I'm finding that some Apache Curator recipes don't work with older versions of ZooKeeper. This isn't an issue except that I keep having developers in my company try to use some code I wrote and it fails without any errors or log messages due to them running an old version of their local machine. So I want to retrive the version of the ZooKeeper server to which I'm connected and die with an useful error message if the version is too old. However, I can't find any way to get the server's version number with either the Curator or ZooKeeper APIs. Anyone know how to do it?
The ZooKeeper "four letter words" can help. You can connect to the local ZK instance on port 2181 and execute a "srvr" four letter word. You'll get back lines of info one of which is the version.
Have a look at Exhibitor's FourLetterWord class for a sample of how to get this programmatically: https://github.com/Netflix/exhibitor/blob/40a02452dc3133fe37bf4ecf076bda99c29ab6ec/exhibitor-core/src/main/java/com/netflix/exhibitor/core/state/FourLetterWord.java

Server Name Indication support for java 1.6

I want to add SNI support for my server build on java. After googling i found that java 1.8 have the support in Server side. Is there any library or patch to support SNI in server side for java 1.6?
I created patch for JSSE to support SNI in java 7.
https://github.com/jvenugopal/jsse-sni-patch

Categories

Resources