I am trying to implement a delayed message mechanism using TTL and DLQ (since delayed plugin does not work well with large number of delayed message). I am planing on having around 2/3 millions on the delayed queue at some point. Would it be an acceptable use case ?
Any advice or limitations on using quorum queue with per-message TTL vs per-message queue TTL ? Would greatly apreciate any valuable feedback! Thanks a lot for your help!
Jonathan.
Related
jms queues has jmsdeliverycount.If message read from queue one more time we can track with this property.What is the equvaliant of this RabbitMQ .net.
I want to check how many times this message read from queue(in transactional reads)
Currently there is nothing out-of-the-box. All you get is a redelivery flag to say it has been redelivered, but not how many times.
You can track this issue.
Quorum queues track the number of redeliveries, in the x-delivery-count header. See here
There is a feature request to add the same to classic queues.
I have started with ActiveMQ just one day ago, so my knowledge on it is limited.
My target is to check the ActiveMQ stability and throughput in different scenario for JMS message.
So, following is one scenario.
1. I am publishing 1 mil non-persistent synchronous messages to topic and subscribing it synchronously non durable manner. One publisher and one subscriber.
2. The broker, publisher and subscriber is up during the test.
Unfortunately nearly most of the times(only one time I got all messages out of 14 try), I am not getting all the messages(1 mil) in subscriber end. nearly 5500 messages are lost.
I did the same test for tibco ems and ibm mq and did not get this issue.
So, for ActiveMQ, if I need all messages to be received, is it necessary to use persistent message and durable subscriber always?
Don't think form the angle of guaranteed messaging or fail-over scenario.
Any suggestion is welcome.
Thanks,
Smith
Not sure about your exact scenario. But ActiveMQ will limit the memory used for buffering messages when the producer is faster than the consumer by dropping old messages above a certain limit.
This is configurable.
I would like to know if there is any implication when using concurrentStoreAndDispatchQueues = true with persistent messages and needed guaranty order.
We are using Kaha, with persistent messages and we need guaranty order, we re using also JMSXGroupID.
Is there any implication setting this to true, is it possible lost of messages?
Any help or clarification about the property concurrentStoreAndDispatchTopics will be helpful.
Thanks .
I think concurrentStoreAndDispatchQueues option improves the performance of message consumption from ActiveMQ queues. But it is less reliable than synchronous store and dispatch.
In case of concurrent store and dispatch broker does not wait for acknowledgments from consumer or message storage. It dispatches the message to consumers and to message storage thread in parallel and immediately sends back the acknowledgment to message producers.
So there is chance of messages being lost in case of message storage disk issues.
Please refer the documentation from Fuse ESB which explains the similar concept -
https://access.redhat.com/documentation/en-US/Fuse_ESB/4.4.1/html/ActiveMQ_Tuning_Guide/files/PersTuning-SerialToDisk.html
I'm trying to achieve load balancing between different types of messages. I would not know in advance what the messages coming in might be until they hit the queue. I know I can try resequencing the messages, but I was thinking that maybe if there was a way to have the various consumers round robin between either queues or between topics, this would solve my problem.
The main problem i'm trying to solve is that I have many services sending messages to one queue with many consumers feeding off one queue. I do not want one type of service monopolizing the entire worker cluster. Again I don't know in advance what the messages that are going to hit the queue are going to be.
To try to clearly repeat my question:
Is there a way to tell the consumers to round robin between either existing queues or topics?
Thank you in advance.
I found the answer to my question on another post just had to know to look there. I resolved my problem by not creating AMQ consumer but a JMS listener with a composite destination as specified in this post: jms-listener-dynamically-choose-destinations. It turns out the JMS listener automatically round robins though all the queues you assign to it.
Consumers on a Queue will already do round robin processing of the messages on the Queue. The one thing to keep in mind is consumer prefetch which can allow one consumer to grab many messages before others arrive on the Queue so you may need to adjust prefetch depending on your scenario.
Read up on the differences between Queue and Topic here.
I am starting with ActiveMQ and I have a usecase. i have n producers sending messages into a Queue Q1. I want to stop the delivery of messages (i.e. i do not want consumers to consume those messages). I want to store the messages for sometime without those being consumed.
I was looking at ways this can be achieved. These two things came into my mind based on what i browsed through.
Using Mirrored queues, so that I can wiretap the messages and save into a virtual queue.
Possibly stop consumers from doing a PULL on the queue.
Another dirty way of doing this is by making consumers not send ack messages once its consumed a message from the queue.
We are currently not happy with either of these.
Any other way you can suggest.
Thanks in advance.
If you always want message delivery to be delayed you can use the scheduler feature of ActiveMQ to delay delivery until a set time or a fixed delay etc.
Other strategies might also work but it really up to you to design something that fits your use case. You can try to use Apache Camel to define a route that implements the logic of your use case to either dispatch a message to a Queue or send it to the scheduler for delayed processing. It all really depends on your use case and requirements.