You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ohsgx <oh...@gmail.com> on 2015/10/30 03:12:14 UTC

artemis cluster don't redistribute message

Hi.
I was clustering two artemis node, each node was configured the same queue
in broker.xml file. 
Producer A sends a message(with selector) to the node A. Consumer A connect
to node A and consume message with selector (node = a), Consumer B connect
to node B and consume message with selector (node = b). 
Everything is OK when the consumer A and B are normal. But I kill the
consumer B for a while and I start again consumer B. Then the messages for
down time were not redistributed node B. When I check MQ using JMX, those
message remain node A. How can I configure cluster for those message
redistribute when downed node is up.



--
View this message in context: http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: artemis cluster don't redistribute message

Posted by Tim Bain <tb...@alumni.duke.edu>.
Apparently I did have a different definition in mind: I was interpreting
"redistribution" as "redelivery", which would happen when a transaction was
rolled back or a client disconnected with unacknowledged messages.  Clearly
that's not what Artemis means by that term, and what's meant is clearly not
that.  I'm not aware of much difference in ActiveMQ between how a broker
sends messages when a client is connected and how it sends them when a
client connects later (and ActiveMQ supports both scenarios seamlessly), so
ActiveMQ doesn't highlight a distinction between the two scenarios.
Messages sent to an ActiveMQ broker will make their way to an eligible
client (including one using a selector) irrespective of whether a selector
is in use.

So now I'm curious: in the Artemis codebase, what's different enough about
the two scenarios to cause selectors to work in one case but not the other?

Tim

On Fri, Oct 30, 2015 at 8:25 AM, Justin Bertram <jb...@apache.com> wrote:

> I'm a bit confused by your comment, Tim.
>
> When I think of "first-time distribution" I think of when the message
> arrives on the cluster for the first time and it is distributed to a node
> with a matching consumer.  Artemis supports this for consumers with
> selectors.
>
> When I think of "redistribution" I think of when the message arrives on
> the cluster for the first time and there are no matching consumers and then
> later a matching consumer connects to another node in the cluster and the
> message is redistributed to that node.  Artemis doesn't support this for
> consumers with selectors.
>
> To me, the question about "messages produced while the queue consumer is
> disconnected" is about redistribution - at least how Artemis defines it.
> Based on your comment it appears you have different ideas about what
> "redistribution" and "first-time distribution" means.  Can you clarify?
>
>
> Justin
>
> ----- Original Message -----
> From: "Tim Bain" <tb...@alumni.duke.edu>
> To: "ActiveMQ Users" <us...@activemq.apache.org>
> Sent: Friday, October 30, 2015 8:31:20 AM
> Subject: Re: artemis cluster don't redistribute message
>
> This isn't redistribution, it's first-time distribution: the question is
> about messages produced while the queue consumer is disconnected.  And that
> definitely does work in ActiveMQ.
> On Oct 29, 2015 9:14 PM, "Clebert Suconic" <cl...@gmail.com>
> wrote:
>
> > Ah... based on selectors...
> >
> > I don't think ActiveMQ5 supports it either.. it's a fundamental
> > problem that usually goes against the messaging context.
> >
> >
> > Most of times I have seen this pattern being used the Messaging system
> > was being used for store & retrieve. I.e. a database like application.
> > which usually tends to fail.
> >
> > I'm not saying it's your case.. but it's been the case most times I
> > seen that need.
> >
> > On Thu, Oct 29, 2015 at 10:40 PM, Justin Bertram <jb...@apache.com>
> > wrote:
> > > As far as I know redistribution based on selectors is not currently
> > supported in Artemis.
> > >
> > >
> > > Justin
> >
> >
> >
> > --
> > Clebert Suconic
> >
>

Re: artemis cluster don't redistribute message

Posted by Clebert Suconic <cl...@gmail.com>.
the message is always sent to the host where it is being produced...
it will later be redistributed over demand.


AFAIK AMQ5 would be the same?

On Fri, Oct 30, 2015 at 10:25 AM, Justin Bertram <jb...@apache.com> wrote:
> I'm a bit confused by your comment, Tim.
>
> When I think of "first-time distribution" I think of when the message arrives on the cluster for the first time and it is distributed to a node with a matching consumer.  Artemis supports this for consumers with selectors.
>
> When I think of "redistribution" I think of when the message arrives on the cluster for the first time and there are no matching consumers and then later a matching consumer connects to another node in the cluster and the message is redistributed to that node.  Artemis doesn't support this for consumers with selectors.
>
> To me, the question about "messages produced while the queue consumer is disconnected" is about redistribution - at least how Artemis defines it. Based on your comment it appears you have different ideas about what "redistribution" and "first-time distribution" means.  Can you clarify?
>
>
> Justin
>
> ----- Original Message -----
> From: "Tim Bain" <tb...@alumni.duke.edu>
> To: "ActiveMQ Users" <us...@activemq.apache.org>
> Sent: Friday, October 30, 2015 8:31:20 AM
> Subject: Re: artemis cluster don't redistribute message
>
> This isn't redistribution, it's first-time distribution: the question is
> about messages produced while the queue consumer is disconnected.  And that
> definitely does work in ActiveMQ.
> On Oct 29, 2015 9:14 PM, "Clebert Suconic" <cl...@gmail.com>
> wrote:
>
>> Ah... based on selectors...
>>
>> I don't think ActiveMQ5 supports it either.. it's a fundamental
>> problem that usually goes against the messaging context.
>>
>>
>> Most of times I have seen this pattern being used the Messaging system
>> was being used for store & retrieve. I.e. a database like application.
>> which usually tends to fail.
>>
>> I'm not saying it's your case.. but it's been the case most times I
>> seen that need.
>>
>> On Thu, Oct 29, 2015 at 10:40 PM, Justin Bertram <jb...@apache.com>
>> wrote:
>> > As far as I know redistribution based on selectors is not currently
>> supported in Artemis.
>> >
>> >
>> > Justin
>>
>>
>>
>> --
>> Clebert Suconic
>>



-- 
Clebert Suconic

Re: artemis cluster don't redistribute message

Posted by Justin Bertram <jb...@apache.com>.
I'm a bit confused by your comment, Tim.  

When I think of "first-time distribution" I think of when the message arrives on the cluster for the first time and it is distributed to a node with a matching consumer.  Artemis supports this for consumers with selectors.

When I think of "redistribution" I think of when the message arrives on the cluster for the first time and there are no matching consumers and then later a matching consumer connects to another node in the cluster and the message is redistributed to that node.  Artemis doesn't support this for consumers with selectors.

To me, the question about "messages produced while the queue consumer is disconnected" is about redistribution - at least how Artemis defines it. Based on your comment it appears you have different ideas about what "redistribution" and "first-time distribution" means.  Can you clarify?


Justin

----- Original Message -----
From: "Tim Bain" <tb...@alumni.duke.edu>
To: "ActiveMQ Users" <us...@activemq.apache.org>
Sent: Friday, October 30, 2015 8:31:20 AM
Subject: Re: artemis cluster don't redistribute message

This isn't redistribution, it's first-time distribution: the question is
about messages produced while the queue consumer is disconnected.  And that
definitely does work in ActiveMQ.
On Oct 29, 2015 9:14 PM, "Clebert Suconic" <cl...@gmail.com>
wrote:

> Ah... based on selectors...
>
> I don't think ActiveMQ5 supports it either.. it's a fundamental
> problem that usually goes against the messaging context.
>
>
> Most of times I have seen this pattern being used the Messaging system
> was being used for store & retrieve. I.e. a database like application.
> which usually tends to fail.
>
> I'm not saying it's your case.. but it's been the case most times I
> seen that need.
>
> On Thu, Oct 29, 2015 at 10:40 PM, Justin Bertram <jb...@apache.com>
> wrote:
> > As far as I know redistribution based on selectors is not currently
> supported in Artemis.
> >
> >
> > Justin
>
>
>
> --
> Clebert Suconic
>

Re: artemis cluster don't redistribute message

Posted by Tim Bain <tb...@alumni.duke.edu>.
This isn't redistribution, it's first-time distribution: the question is
about messages produced while the queue consumer is disconnected.  And that
definitely does work in ActiveMQ.
On Oct 29, 2015 9:14 PM, "Clebert Suconic" <cl...@gmail.com>
wrote:

> Ah... based on selectors...
>
> I don't think ActiveMQ5 supports it either.. it's a fundamental
> problem that usually goes against the messaging context.
>
>
> Most of times I have seen this pattern being used the Messaging system
> was being used for store & retrieve. I.e. a database like application.
> which usually tends to fail.
>
> I'm not saying it's your case.. but it's been the case most times I
> seen that need.
>
> On Thu, Oct 29, 2015 at 10:40 PM, Justin Bertram <jb...@apache.com>
> wrote:
> > As far as I know redistribution based on selectors is not currently
> supported in Artemis.
> >
> >
> > Justin
>
>
>
> --
> Clebert Suconic
>

Re: artemis cluster don't redistribute message

Posted by Clebert <cl...@gmail.com>.
I would like to see a test working on activemq 5. And we could then figure out how it was implemented   

Last time I checked it was the same.  But for someone provide me a working test I will figure out how it works. 

-- Clebert Suconic typing on the iPhone. 

> On Oct 31, 2015, at 10:43, Tim Bain <tb...@alumni.duke.edu> wrote:
> 
> ActiveMQ supports your use case.  Artemis apparently does not, though I'd
> love to hear why not.  I can't speak for other JMS providers since I
> haven't used them; you'd need to investigate them on a case-by-case basis
> rather than making the blanket assumption that they don't.
>> On Oct 31, 2015 8:08 AM, "ohsgx" <oh...@gmail.com> wrote:
>> 
>> Thank you for your reply.
>> I already 'redistribution-delay' configuration.
>> 
>> If consumer B connect to Node A, consumer B get all producing messages
>> produced down time (they remain node A queue). I can't understand this
>> situation. There is no consistency.  Artemis doesn't support message
>> redistribute(or redelivery) in cluster environment? Other MQ also doesn't
>> support this case?
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503p4703567.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> 

Re: artemis cluster don't redistribute message

Posted by Clebert <cl...@gmail.com>.
Notice it would work with a topic subscription and filters.  Queues are different.  


-- Clebert Suconic typing on the iPhone. 

> On Oct 31, 2015, at 10:43, Tim Bain <tb...@alumni.duke.edu> wrote:
> 
> ActiveMQ supports your use case.  Artemis apparently does not, though I'd
> love to hear why not.  I can't speak for other JMS providers since I
> haven't used them; you'd need to investigate them on a case-by-case basis
> rather than making the blanket assumption that they don't.
>> On Oct 31, 2015 8:08 AM, "ohsgx" <oh...@gmail.com> wrote:
>> 
>> Thank you for your reply.
>> I already 'redistribution-delay' configuration.
>> 
>> If consumer B connect to Node A, consumer B get all producing messages
>> produced down time (they remain node A queue). I can't understand this
>> situation. There is no consistency.  Artemis doesn't support message
>> redistribute(or redelivery) in cluster environment? Other MQ also doesn't
>> support this case?
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503p4703567.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> 

Re: artemis cluster don't redistribute message

Posted by Tim Bain <tb...@alumni.duke.edu>.
ActiveMQ supports your use case.  Artemis apparently does not, though I'd
love to hear why not.  I can't speak for other JMS providers since I
haven't used them; you'd need to investigate them on a case-by-case basis
rather than making the blanket assumption that they don't.
On Oct 31, 2015 8:08 AM, "ohsgx" <oh...@gmail.com> wrote:

> Thank you for your reply.
> I already 'redistribution-delay' configuration.
>
> If consumer B connect to Node A, consumer B get all producing messages
> produced down time (they remain node A queue). I can't understand this
> situation. There is no consistency.  Artemis doesn't support message
> redistribute(or redelivery) in cluster environment? Other MQ also doesn't
> support this case?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503p4703567.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: artemis cluster don't redistribute message

Posted by ohsgx <oh...@gmail.com>.
Thank you for your reply. 
I already 'redistribution-delay' configuration. 

If consumer B connect to Node A, consumer B get all producing messages
produced down time (they remain node A queue). I can't understand this
situation. There is no consistency.  Artemis doesn't support message
redistribute(or redelivery) in cluster environment? Other MQ also doesn't
support this case?



--
View this message in context: http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503p4703567.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: artemis cluster don't redistribute message

Posted by Clebert Suconic <cl...@gmail.com>.
Ah... based on selectors...

I don't think ActiveMQ5 supports it either.. it's a fundamental
problem that usually goes against the messaging context.


Most of times I have seen this pattern being used the Messaging system
was being used for store & retrieve. I.e. a database like application.
which usually tends to fail.

I'm not saying it's your case.. but it's been the case most times I
seen that need.

On Thu, Oct 29, 2015 at 10:40 PM, Justin Bertram <jb...@apache.com> wrote:
> As far as I know redistribution based on selectors is not currently supported in Artemis.
>
>
> Justin



-- 
Clebert Suconic

Re: artemis cluster don't redistribute message

Posted by Justin Bertram <jb...@apache.com>.
As far as I know redistribution based on selectors is not currently supported in Artemis.


Justin

Re: artemis cluster don't redistribute message

Posted by Clebert Suconic <cl...@gmail.com>.
did you look at
examples/features/clustered/queue-message-redistribution under the
distribution?


that has the exact settings you need for that to happen. if you have
any questions after that let us know.

On Thu, Oct 29, 2015 at 10:12 PM, ohsgx <oh...@gmail.com> wrote:
> Hi.
> I was clustering two artemis node, each node was configured the same queue
> in broker.xml file.
> Producer A sends a message(with selector) to the node A. Consumer A connect
> to node A and consume message with selector (node = a), Consumer B connect
> to node B and consume message with selector (node = b).
> Everything is OK when the consumer A and B are normal. But I kill the
> consumer B for a while and I start again consumer B. Then the messages for
> down time were not redistributed node B. When I check MQ using JMX, those
> message remain node A. How can I configure cluster for those message
> redistribute when downed node is up.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Clebert Suconic