You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by alexandry <gr...@gmail.com> on 2012/02/21 09:28:27 UTC

AMQ+stomp+php performance issues

Hi, i have the following configuration
http://activemq.2283324.n4.nabble.com/file/n4406306/activemq.xml
activemq.xml 
and the following code in php
http://activemq.2283324.n4.nabble.com/file/n4406306/test_s.php test_s.php 

when i run it without sending any messages time to check if there are frame
takes about 2s !
php test_s.php
Connect 0.10
subscribe 0.10
read1 2.09
read2 4.08
read3 6.07
bool(false)
total 6.07

but where there are exist message times to check is much less. Any idea how
i can make it to check more quick?
# php test_s.php send

Connect 0.10

sent0.10

subscribe 0.10

read1 0.21

read2 0.21

read3 0.21
object(StompFrame)#2 (3) {
  ["command"]=>
  string(7) "MESSAGE"
  ["headers"]=>
  array(5) {
    ["message-id"]=>
    string(54) "ID:grobokop.evaxsoft.ru-34968-1329811831410-4:9:-1:1:1"
    ["destination"]=>
    string(11) "/queue/foo3"
    ["timestamp"]=>
    string(13) "1329812810172"
    ["expires"]=>
    string(1) "0"
    ["priority"]=>
    string(1) "4"
  }
  ["body"]=>
  string(3) "bar"
}

total 0.21



--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-stomp-php-performance-issues-tp4406306p4406306.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: AMQ+stomp+php performance issues

Posted by Arjen van der Meijden <ac...@tweakers.net>.
It is doing that. Normally a queue/topic-consumer is a long-running 
client that will basically just do work whenever a message arrives. It 
will normally not connect to see if there is a message and than 
disconnect to repeat things later on.

If you have different requirements, that obviously changes things. You 
can probably work around it by reducing the timeout a lot, or perhaps by 
first checking whether there actually are messages (although, with 
PHP/Stomp that's not trivial) in the queue before listening to it.

Best regards,

Arjen

On 21-2-2012 11:38, alexandry wrote:
> Please disregard the question, i look into source code of php stomp
> implementation and it seems, like has frame is simply wait max wait period
> of 2 sec to see if message will appear.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-stomp-php-performance-issues-tp4406306p4406615.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: AMQ+stomp+php performance issues

Posted by alexandry <gr...@gmail.com>.
Please disregard the question, i look into source code of php stomp
implementation and it seems, like has frame is simply wait max wait period
of 2 sec to see if message will appear.

--
View this message in context: http://activemq.2283324.n4.nabble.com/AMQ-stomp-php-performance-issues-tp4406306p4406615.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.