Re: Message Selector or Composite Destinations
Ah, I see why the activemq.xml changes now. Two ways to get out of the activemq.xml: * Just have the producers directly produce to the two versioned queues, or * Use a camel route running outside of AMQ to move the messages (one nice advantage over the existing solution is it takes the overhead of applying the selection criteria outside of AMQ) -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687827.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
Yes for the moment I'm using this And each consumer is using each queue C1 -> Q1 and C2 -> Q2, and this is working fine. Thanks! -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p468.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
Not trying to ignore any possible issue here... Is it feasible to use two different queues? One for each version. That may be the best way to go for many reasons. -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687775.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
I did a few test and this work when I have a lot of message of Version2 and Version1. And the first test I send 5000 messages of each versions, and the consumer starting process normal, and when process 500 messages stop, and start to process again when all the messages was in the queue. In other test, this the consumer stop to process and not start again. If I start the consumer 2, all the messages are processed. -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687748.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
It sounds like it could be a bug, though it might not be. Assuming you can reproduce this in a test environment, you should try attaching a debugger to the broker, setting breakpoints, and stepping through the relevant code. AbstractSubscription.matches() and Queue.doAcutalDispatch() seem like good places to start with your breakpoints, though I haven't stepped through this particular code before so I'm just guessing. Also, does this happen when there are only a few messages in the queue? Or does it only happen when there are lots of Version 2 messages mixed in with the Version 1 messages? And does it fix itself when the Version2 consumer comes back online, or are there still unprocessed messages when both consumers are online? I've got a vague memory that in earlier versions of ActiveMQ, there was a limit to how many messages could be in the cursor to be dispatched at any one time and that messages not in the cursor weren't considered for dispatching (so only the first N messages in the queue could be processed, and if all of them were Version 2 messages, they could block any Version 1 messages from being blocked until the Version 1 consumer came online and cleared some of them out). I may be misremembering, and if not there may have been changes in the behavior since those discussions, but if this is still how the broker works, then it could explain messages being blocked while the Version 2 consumer is offline but getting processed once all consumers are back online. On Tue, Nov 18, 2014 at 1:58 PM, juanmanuel.romeraferrio < juanmanuel.romerafer...@gmail.com> wrote: > I'm using version 5.10.0 > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687673.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: Message Selector or Composite Destinations
I'm using version 5.10.0 -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687673.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
It might be a problem with selectors, or with cursors, or maybe something else. What version of ActiveMQ are you using? I remember seeing JIRAs against pre-5.8.0 versions about cursors that allowed messages to get stuck, so if you're using an older version, you might just need to upgrade. On Tue, Nov 18, 2014 at 6:43 AM, juanmanuel.romeraferrio < juanmanuel.romerafer...@gmail.com> wrote: > Sorry, I know that my English is not good. > > Consumer with selector Version=1 - ON > Consumer with selector Version 2 - OFF > > I sent message of Version 1, and Version 2. > > The messages of Version 2 are storage in the queue this is OK, because the > consumer is OFF. > The messages of Version 1, some are consumed and other no and stay in the > queue. This is a problem with selector, because I expected that all the > messages of Version 1 are consumed, because this consumer is ON. > > > > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687633.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: Message Selector or Composite Destinations
Sorry, I know that my English is not good. Consumer with selector Version=1 - ON Consumer with selector Version 2 - OFF I sent message of Version 1, and Version 2. The messages of Version 2 are storage in the queue this is OK, because the consumer is OFF. The messages of Version 1, some are consumed and other no and stay in the queue. This is a problem with selector, because I expected that all the messages of Version 1 are consumed, because this consumer is ON. -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687633.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
Also, which version of ActiveMQ are you using? On Nov 18, 2014 5:41 AM, "juanmanuel.romeraferrio" < juanmanuel.romerafer...@gmail.com> wrote: > No, this is OK. The problems is that when the consumer VERSION 2 is off and > the consumer VERSION 2 is on, and I send messages of the 2 VERSION the > messages of VERSION 1 stay in the queue and are not consumed by the > consumer > or sometimes are consumed a little part and the other stay in the queue. > And I want that if the consumer is on, consume all the messages. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687627.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: Message Selector or Composite Destinations
Sorry, which consumer is off and which is on? Your email said VERSION 2 for both, but I assume that's not what you meant. On Nov 18, 2014 5:41 AM, "juanmanuel.romeraferrio" < juanmanuel.romerafer...@gmail.com> wrote: > No, this is OK. The problems is that when the consumer VERSION 2 is off and > the consumer VERSION 2 is on, and I send messages of the 2 VERSION the > messages of VERSION 1 stay in the queue and are not consumed by the > consumer > or sometimes are consumed a little part and the other stay in the queue. > And I want that if the consumer is on, consume all the messages. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687627.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Re: Message Selector or Composite Destinations
No, this is OK. The problems is that when the consumer VERSION 2 is off and the consumer VERSION 2 is on, and I send messages of the 2 VERSION the messages of VERSION 1 stay in the queue and are not consumed by the consumer or sometimes are consumed a little part and the other stay in the queue. And I want that if the consumer is on, consume all the messages. -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564p4687627.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Message Selector or Composite Destinations
So what do you want to happen when the Version2 consumer isn't connected? Right now the Version2 messages stay available for the Version2 when it reconnects; what do you want to happen instead? On Mon, Nov 17, 2014 at 12:00 PM, juanmanuel.romeraferrio < juanmanuel.romerafer...@gmail.com> wrote: > Hi, > > I'm in a trouble in my system. I have a lot of clients that send message > with differente VERSION and I have one consumer per version that recibe > this > message, I'm using message selector on a only queue to do that, but I found > a problem when I sent for exmple message of 2 versions and I had only one > consumer up, the message that are of the version of consumer up, are not > consumed and still like pending. > > I found a link that describe that > http://trenaman.blogspot.co.uk/2009/01/message-selectors-and-activemq.html > > Then I saw the idea of Composite Destinations, this works, but this has a > limitation. When I need add a new consumer I need change the activemq.xml > of > broker, and this mean stop and start the broker. > > What's is the best solution? > > Thanks, > Juan Manuel > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >
Message Selector or Composite Destinations
Hi, I'm in a trouble in my system. I have a lot of clients that send message with differente VERSION and I have one consumer per version that recibe this message, I'm using message selector on a only queue to do that, but I found a problem when I sent for exmple message of 2 versions and I had only one consumer up, the message that are of the version of consumer up, are not consumed and still like pending. I found a link that describe that http://trenaman.blogspot.co.uk/2009/01/message-selectors-and-activemq.html Then I saw the idea of Composite Destinations, this works, but this has a limitation. When I need add a new consumer I need change the activemq.xml of broker, and this mean stop and start the broker. What's is the best solution? Thanks, Juan Manuel -- View this message in context: http://activemq.2283324.n4.nabble.com/Message-Selector-or-Composite-Destinations-tp4687564.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.