2

We use ActiveMQ, php and stomp. And we found that when ActiveMQ rebooted consumers working over stomp can't recognize that connection lost. I found, that only stomp 1.2 support heartbeat. And ActiveMQ uses stomp 1.1 and newest php stomp implementation support only 1.0 version. Also i try amqp, but newest implementation that i found for php support 0.9.1, ActiveMQ uses 1.0 version and when client connecting ActiveMQ return error:

WARN | Connection attempt from non AMQP v1.0 client. AMQP,0,0,9,1
WARN | Transport Connection to: tcp://127.0.0.1:42168 failed: org.apache.activemq.transport.amqp.AmqpProtocolException: Connection from client using unsupported AMQP attempted

Also i try compile qpid proton, but i have some problems in ubuntu and i confused by their php examples: https://qpid.apache.org/releases/qpid-proton-0.8/messenger/php/examples/recv.php.html Where can i find proton.php for including?

Which transport i should choose?

Hayate
  • 653
  • 1
  • 9
  • 25

1 Answers1

-1

It seems that you have a deadlock of versions... no easy solution.

An option could be to implement a heartbeat at the application level. Every X seconds do: - connect - send to a queue (eg. heartbeat) - receive from the same queue - sleep for X seconds (X should be less than the time needed to reboot ActiveMQ)

This way, your code will realize that ActiveMQ was rebooted and the rest of connections could be reset.

If it would be possible for your project, I would switch to RabbitMQ and use AMQP with php-amqplib.

jarias
  • 166
  • 7
  • As we found, when we choosing broker, RabbitMQ don't have native support of scheduled messages. It's critical part of our tasks and solutions. And we got a lot of expirience with ActiveMQ. It's hard switch to another broker. :( – Hayate Dec 11 '15 at 11:23
  • The answer, "use a different tool instead" isn't a sufficiently good answer to the question asked. – RaGe Dec 12 '15 at 19:40
  • @RaGe given the combination of Language, Libraries used and Requirements... there are not a lot of other options. But I would be glad to hear them... – jarias Dec 14 '15 at 12:04