Openwire: New line character in message
Hello, I am using openwire. When I receive FIX message, I am getting new line character in beginning and end of the message from ActiveMQ broker. Is there anyway to avoid these chr(10): Message received: Whole message [ 35=AS|755=yaj314|70=yaj314|71=2|795=yaj314|794=8|87=3|857=1|54=2|55=MKS|48=GB0031274896|207=XLON|22=4|53=51|6=4.3359|15=GBP|453=1|448=WINS|447=D|452=1|75=20160219|60=20160219-11:44:55|63=0|64=20160223|78=1|79=507ZBIM|80=51|153=4.3359|154=221.13|120=GBP ] Way it should be: Whole message [35=AS|755=yaj314|70=yaj314|71=2|795=yaj314|794=8|87=3|857=1|54=2|55=MKS|48=GB0031274896|207=XLON|22=4|53=51|6=4.3359|15=GBP|453=1|448=WINS|447=D|452=1|75=20160219|60=20160219-11:44:55|63=0|64=20160223|78=1|79=507ZBIM|80=51|153=4.3359|154=221.13|120=GBP] Problem is that GBP gets a new line. Instead of removing them for every message, is there any config on ActiveMQ side to say that don't receive new line. OR I am missing some bit here. We don't have two messages coming togather to delimit by new line so it's a bit of trouble to remove these new line everytime. Your help will be appreciated. Thanks AJ -- View this message in context: http://activemq.2283324.n4.nabble.com/Openwire-New-line-character-in-message-tp4718083.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Monitoring Messages on Queue / Topic
Hello, I need some kind of mechanism where an alert is raised if a message is not consumed in say X seconds. Does ActiveMQ provide any plugin or facility for it. How can I make sure that a message is not sitting in the queue (or not consumed by subscriber) and no notification is raised. We don't use Advisory topic/queues so don't know much about them but can advisory topic / queue help in this regard? Or something like browsing the queue / topic and not consume it. Thanks AJK -- View this message in context: http://activemq.2283324.n4.nabble.com/Monitoring-Messages-on-Queue-Topic-tp4716828.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Active MQ Performance
Out of two issues, I am able to resolve first one (Queue taking considerable time on persistent messages). Topic was fast because by default, concurrentStoreAndDispatchTopics is false for Topic. For Queue, it's enabled. But main difference was enableJournalDiskSyncs on each message. >From SAR command, I found that IO wait time was quite high. Sometime 30%. I switched off enableJournalDiskSyncs and concurrentStoreAndDispatchQueues and it worked. I think it's not ideal and makes it less reliable when broker kills but it works until I find an alternative to wait io. Still looking into for seconding issue. Thanks Ajay Kumar -- View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4713145.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Active MQ Performance
Hello Matt, Thanks for your message. I will do these settings and see what happens. I have attached links to code and results. My test show these two problems: - ActiveMQ Queue takes more time in Persistent Mode (Q28,Q31 rows in excel sheet) as compared to Sonic. - ActiveMQ Non Persistent Per Message Max time is very high. (Example: U59, U56). It looks consumer is not fast enough to process them. Overall, Maximum Time taken by any message in flight between producer and sender in ActiveMQ is quote high. I have copied the code to IDEONE editor (it's just a copy and IDEONE don't have necessary libs) to share if it helps: Producer: http://ideone.com/4nmARP Consumer: http://ideone.com/QnFHYk Results: https://docs.google.com/spreadsheets/d/1hHt7EsgwGSxHR11edunWSuzzTbc88Wch8lFkBXmPxUI/edit?usp=sharing If you can't access code on IDEONE: Producer - https://docs.google.com/document/d/1RbGUKYUbWUk8LcxqbCwf53_lNEfhnxfDz3TPqSNT2Dg/edit?usp=sharing Consumer - https://docs.google.com/document/d/1jW5qPG40yUTBaHezEpjKrwBFZriL2bpxHZcM0U_2Gfk/edit?usp=sharing Sorry if above link passage is not as per forum protocol. I am new to the forum. Thanks AJ -- View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4713058.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: Active MQ Performance
Hello Celebert, I am using apache-activemq-5.12.1. I found out the issue. My subscribers were on same machine as ActiveMQ install. While 5 subscribers, consuming messages on same machine as install, it was quite intensive. I moved subscribers to a separate machine than install and it took 9 seconds to send messages and almost similar to receive. This is about persistent messages. For non persistent, in new setup, it takes 1.7 seconds which is acceptable. However, consumer (gets all msgs in 6 seconds) in is showing messages waiting for 1+ seconds. For SonicMQ, time taken is consistent irrespective of consumer on machine where sonic install is there. I feel that this 9 second is still high for sending 25000 msgs. It can do better. Also, can this CPU and memory intensiveness improved. I will go through Artemis. Sorry for naive query but how different Artemis is to ActiveMQ. I haven't explored that front. Thanks AJ Thanks AJ -- View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4712960.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Active MQ Performance
Hello, I am doing some raw performance tests on ActiveMQ to replace SonicMQ (JMS based) on C++ side. We have CMS using OpenWire. My test has got five Non Durable subscribers on a Topic. When I send 25000 messages, following happens: 1. Persistent - It takes 3 times (27sec) more than what it takes on SonicMQ (9sec). I need to find out what's causing this delay and how to improve it. I understand that publisher will wait until broker comes back to ack messages. I am using Auto_ACK. I have looked at SonicMQ settings for IO Buffer and socket buffer and do the same for ActiveMQ but no success. 2. Non Persistent - This one is faster as fire and forget but messages are sometime 2 seconds in flight on subscriber which is unacceptable to our use case. I tried setting prefetch etc thinking it's slow consumer but no success. Hardware is same for both. ActiveMQ install is default installation. I am going through performance tuning guide mentioned in the forum but any quick clues / areas to look at will be appreciated. Sorry if my query is too subjective but I want to find out where ActiveMQ is taking time and why. I have done raw tests just using stomp on ActiveMQ (No CPP involved) and it was way faster as compared to Sonic. So I suspect, I need to tweak some settings which may be causing it. Thanks AJ -- View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
[Stomp/ActiveMQ CMS] Stomp Delivery Mode
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. Please note that hardware is identical to do all these tests. 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 perforamance. 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-Stomp-Delivery-Mode-tp4712043.html Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
Re: [Stomp/ActiveMQ CMS] Delivery Mode
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.
[Stomp/ActiveMQ CMS] Delivery Mode
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.