Communicating between PHP and Java using ActiveMQ/Stomp -


background

I have two services that communicate with each other Need to have a lipissy service on the message queue written in PHP and the other is in Java. Later, PHP service will be rewritten in Java. In the current way, they communicate with each other, writing in a shared database, which is another service choice, that is what I am trying to get away from a message queue and change.

Problem

The communication that I am currently working on is a relatively complex object (wire and integer and Lists and stars and map of integer). Ideally, the solution would be ideal in PHP and would be ideal in Java, because it is going to be the legacy of this project.

Possible Solutions

    1

The solution I came up with is to send message JMG-Jason-Object message to PHP / Stomp, especially JSON, such as when they readObject < / Code> to be dequeued in Java, then they can be completely rebuilt using the object. This rebuilding is done internally and I have to make sure that it is necessary and in place when we finally convert the PHP component to Java, sending a message will only be a case of using writeObject .


Comments