activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <>
Subject Re: Using Topics from PHP over Stomp
Date Mon, 02 Nov 2009 16:41:58 GMT
Hi Rob,

you have to send durable messages in order to make this work.

Take a look at here
more info.
Also, you can take a look at examples/durable.php in PHP Stomp Client 1.0.0

Dejan Bosanac -

Open Source Integration -
ActiveMQ in Action -
Blog -

On Mon, Nov 2, 2009 at 5:36 PM, <> wrote:

> I'm trying to use Topics from PHP over Stomp. I can create a topic and a
> durable subscriber through the web interface and my PHP consumer can
> receive messages if it's connected to the topic when the message is
> added. However, if a message is added to the topic when the consumer
> isn't connected it never gets sent to it. This is not the behaviour I
> was expecting. Basically, I am going to have multiple consumers all of
> which need all the messages. They will be running periodically and
> should receive all the messages sent to the topic since they last ran.
> Any ideas?
> require_once "Stomp.php";
> $stomp = new Stomp('tcp://');
> $stomp->clientId = 'test-client';
> if ($stomp->connect()) {
>  if ($stomp->subscribe('/topic/test.topic')) {
>    $frame = $stomp->readFrame();
>    if ($frame) {
>      $stomp->ack($frame);
>    }
>  }
>  $stomp->disconnect();
> }
> Thanks
> Rob
> -----------------------------------------------------------------------
> This E-mail is from IPC Media Ltd, a company registered in England and
> Wales,
> whose registered office is at Blue Fin Building, 110 Southwark Street,
> London, SE1 0SU, registered number 53626, VAT number 646150645. The
> contents
> and any attachments to it include information that is private and
> confidential
> and should only be read by those persons to whom they are addressed. IPC
> Media accepts no liability for any loss or damage suffered by any person
> arising from the use of this e-mail. Neither IPC Media nor the sender
> accepts
> any responsibility for viruses and it is your responsibility to check the
> email and attachments (if any). No contracts may be concluded on behalf of
> IPC Media by means of e-mail communications. If you have received this
> e-mail
> in error, please destroy and delete the message from your computer.
> Huge savings on magazine subscriptions this Christmas. Find gift
> inspiration at
> Please consider the environment - only print this e-mail if absolutely
> necessary

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message