Re: [Stomp/ActiveMQ CMS] Delivery Mode

2016-05-17 Thread Timothy Bish

On 05/17/2016 10:25 AM, ActiveMQ Investigation wrote:

Thank you for explanation Tim.

Actually I am using Stomp only for our application which is written in
OpenEdge as it doesn't provide any JMS implementation/ API or protocol to
connect to ActiveMQ. So stomp was the way. I am not using STOMP in ActiveMQ
CPP as openwire is already there.


Sending 25K took 4 seconds via Stomp Layer which is acceptable for our use
case.

Now there was another part of system in C++. To check performance for C++
side, I used default setup of ActiveMQ CPP (openwire) and it did send 25k
message in 4 seconds if Delivery Mode is non-persistent. If I make it
persistent, it takes 32 secs on a Queue.


This caused me to investigate what Stomp is doing with Delivery Mode. Is it
sending messages persistently or Non persistently. I expect it should take
approx 32 seconds via stomp as well because Default ActiveMQ mode is
Persistent.

Is there anyway I can check what delivery mode is being used for a
connection.All I have is a native Apache Console to see what Queues /
Topics/connections are there and counter of messages on it.


Any help is appreciated.

Thanks
AJ





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Stomp-ActiveMQ-CMS-Delivery-Mode-tp4712048p4712053.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

If you want to replicate what the CMS or JMS clients do via OpenWire 
then you need to set the persistent header in the STOMP message headers 
(persistent=true) and request a receipt be returned to you via the 
standard STOMP header for doing such (receipt:).


http://activemq.apache.org/stomp.html
http://stomp.github.io/stomp-specification-1.2.html#Header_receipt

--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/



Re: [Stomp/ActiveMQ CMS] Delivery Mode

2016-05-17 Thread ActiveMQ Investigation
Thank you for explanation Tim.

Actually I am using Stomp only for our application which is written in
OpenEdge as it doesn't provide any JMS implementation/ API or protocol to
connect to ActiveMQ. So stomp was the way. I am not using STOMP in ActiveMQ
CPP as openwire is already there. 


Sending 25K took 4 seconds via Stomp Layer which is acceptable for our use
case.

Now there was another part of system in C++. To check performance for C++
side, I used default setup of ActiveMQ CPP (openwire) and it did send 25k
message in 4 seconds if Delivery Mode is non-persistent. If I make it
persistent, it takes 32 secs on a Queue.


This caused me to investigate what Stomp is doing with Delivery Mode. Is it
sending messages persistently or Non persistently. I expect it should take
approx 32 seconds via stomp as well because Default ActiveMQ mode is
Persistent. 

Is there anyway I can check what delivery mode is being used for a
connection.All I have is a native Apache Console to see what Queues /
Topics/connections are there and counter of messages on it.


Any help is appreciated.

Thanks
AJ





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Stomp-ActiveMQ-CMS-Delivery-Mode-tp4712048p4712053.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: [Stomp/ActiveMQ CMS] Delivery Mode

2016-05-17 Thread Timothy Bish

On 05/17/2016 09:18 AM, ActiveMQ Investigation wrote:

Hello,

I am testing ActiveMQ as alternative of SonicMQ for our systems (OpenEdge).
I have done a Stomp Layer on OpenEdge Application to communicate with
ActiveMQ.

When I send 25000 messages on a queue via Stomp to ActiveMQ consumer then it
takes around 4 seconds. When I do it via ActiveMQ CMS c++ client using open
wire, it takes approx 4 seconds if setDeliveryMode is
DeliveryMode::NON_PERSISTENT. If I comment this code (which means Persistent
Mode by default) or use DeliveryMode::PERSISTENT then it takes 32 seconds to
delivery all these messages.

If I do it on Topic on C++ client, irrespective of Delivery Mode setup, it
takes approx 4 seconds to delivery all messages to a non durable subscriber.
If you are using ActiveMQ-CPP to talk to ActiveMQ then the best solution 
is to use the OpenWire protocol as the STOMP support in that library is 
mainly a legacy feature and not actively maintained, it works but it has 
many limitations and probably more than a few bugs.


The difference in times for sending to Topic vs Queue and PERSISTENT vs 
NON-PERSISTENT comes down to the underlying guarantee if QoS that the 
sender expects.  For reliable messaging the client will request a 
response from the broker that indicates that the message has been 
received and stored before the send call returns so it can throw an 
exception if that fails to happen or the broker tells it about some 
error.  When you are dealing with non-persistent messages you are 
essentially saying that you don't care if the message is lost so the 
client doesn't request a response and sends are basically async (fire 
and forget).



My Query due to difference in time metrics is:


Do I need to explicitly send delivery mode via Stomp as Persistent/Non
Persistent i.e doesn't it reciprocate Default Persistence of ActiveMQ
(based on time taken of 4 seconds agains C++ open wire of 32 seconds).
if yes, then what header do I use and should it be in every message I send
or just in connect?
How come topic takes same approx 4 seconds irrespective of Delivery Mode.

Please note that I am not using Async etc to affect this performance. It's a
default configuration of ActiveMQ install I have.

Any help will be appreciated.

Thanks
AJ



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Stomp-ActiveMQ-CMS-Delivery-Mode-tp4712048.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.




--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/



[Stomp/ActiveMQ CMS] Delivery Mode

2016-05-17 Thread ActiveMQ Investigation
Hello,

I am testing ActiveMQ as alternative of SonicMQ for our systems (OpenEdge).
I have done a Stomp Layer on OpenEdge Application to communicate with
ActiveMQ. 

When I send 25000 messages on a queue via Stomp to ActiveMQ consumer then it
takes around 4 seconds. When I do it via ActiveMQ CMS c++ client using open
wire, it takes approx 4 seconds if setDeliveryMode is
DeliveryMode::NON_PERSISTENT. If I comment this code (which means Persistent
Mode by default) or use DeliveryMode::PERSISTENT then it takes 32 seconds to
delivery all these messages.

If I do it on Topic on C++ client, irrespective of Delivery Mode setup, it
takes approx 4 seconds to delivery all messages to a non durable subscriber.

My Query due to difference in time metrics is:

> Do I need to explicitly send delivery mode via Stomp as Persistent/Non
> Persistent i.e doesn't it reciprocate Default Persistence of ActiveMQ
> (based on time taken of 4 seconds agains C++ open wire of 32 seconds).

> if yes, then what header do I use and should it be in every message I send
> or just in connect?

> How come topic takes same approx 4 seconds irrespective of Delivery Mode.

Please note that I am not using Async etc to affect this performance. It's a
default configuration of ActiveMQ install I have. 

Any help will be appreciated.

Thanks
AJ



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Stomp-ActiveMQ-CMS-Delivery-Mode-tp4712048.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.