Yes, ActiveMQ-CPP CMS is a good option for integrating our legacy C code, but I also did c-code integration with java (JMS) as listener(Replier) using JNI and the c function from the java listener. In our case, we have a java listener that actively listens for a message from activemq broker, and then passes this message to the native c-function using JNI , and the response message from c is again sent back to activemq broker using getJMSReplyTo and getJMSCorrelationID .
we have performed both approaches, which listen to the message from the AMQ broker and pass the message to the c function and send a response / processed message to the AMK broker.
however I am interested to know below the point
- which would be the best option and why?
- If we go to Java and C using the JNI, then will there be a performance or concurrency problem to call the shared c library (.so library) from Java?
source share