artemis cluster don't redistribute message

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

artemis cluster don't redistribute message

ohsgx
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.
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

clebertsuconic
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

Justin Bertram-2
In reply to this post by ohsgx
As far as I know redistribution based on selectors is not currently supported in Artemis.


Justin
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

clebertsuconic
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 <[hidden email]> wrote:
> As far as I know redistribution based on selectors is not currently supported in Artemis.
>
>
> Justin



--
Clebert Suconic
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

Tim Bain
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" <[hidden email]>
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 <[hidden email]>
> wrote:
> > As far as I know redistribution based on selectors is not currently
> supported in Artemis.
> >
> >
> > Justin
>
>
>
> --
> Clebert Suconic
>
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

Justin Bertram-2
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" <[hidden email]>
To: "ActiveMQ Users" <[hidden email]>
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" <[hidden email]>
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 <[hidden email]>
> wrote:
> > As far as I know redistribution based on selectors is not currently
> supported in Artemis.
> >
> >
> > Justin
>
>
>
> --
> Clebert Suconic
>
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

clebertsuconic
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 <[hidden email]> 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" <[hidden email]>
> To: "ActiveMQ Users" <[hidden email]>
> 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" <[hidden email]>
> 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 <[hidden email]>
>> wrote:
>> > As far as I know redistribution based on selectors is not currently
>> supported in Artemis.
>> >
>> >
>> > Justin
>>
>>
>>
>> --
>> Clebert Suconic
>>



--
Clebert Suconic
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

Tim Bain
In reply to this post by Justin Bertram-2
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 <[hidden email]> 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" <[hidden email]>
> To: "ActiveMQ Users" <[hidden email]>
> 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" <[hidden email]>
> 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 <[hidden email]>
> > wrote:
> > > As far as I know redistribution based on selectors is not currently
> > supported in Artemis.
> > >
> > >
> > > Justin
> >
> >
> >
> > --
> > Clebert Suconic
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

ohsgx
In reply to this post by clebertsuconic
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?
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

Tim Bain
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" <[hidden email]> 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.
>
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

andytaylor
This post has NOT been accepted by the mailing list yet.
Let me explain How Artemis works with regard to routing messages.

For initial/first time distribution there are 3 configurations
configured on the cluster connection via 'message-load-balancing'

OFF

When set to 'OFF' the message will only be routed to the local node.

STRICT

when set to 'STRICT' messages will be round robined around every node in
the cluster

ON_DEMAND

messages will be round robined around every node that has a consumer
with a matching selector.

Once the message reaches a queue it will stay on that queue until
consumed unless re distribution is enabled, if enabled then messages are
only redistributed  when the queue has no local consumers and when the
redistribution delay has been hit, so if 5 secs messages are
redistributed 5 seconds after the last consumer is removed.

by default redistribution is switched off, this is because order
guarantees can be broken once a message is moved to another node, as
long as they are being consumed by a local consumer then messages are
never redistributed.

(as far as im aware, selectors work with redistribution)


On 31/10/15 14:30, Tim Bain [via ActiveMQ] 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" <[hidden email]
> </user/SendEmail.jtp?type=node&node=4703568&i=0>> 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.
>  >
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://activemq.2283324.n4.nabble.com/artemis-cluster-don-t-redistribute-message-tp4703503p4703568.html
>
> To start a new topic under ActiveMQ - User, email
> [hidden email]
> To unsubscribe from ActiveMQ - User, click here
> <
> NAML
> <
http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>

Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

clebertsuconic
In reply to this post by Tim Bain
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 <[hidden email]> 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" <[hidden email]> 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.
>>
Reply | Threaded
Open this post in threaded view
|

Re: artemis cluster don't redistribute message

clebertsuconic
In reply to this post by Tim Bain
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 <[hidden email]> 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" <[hidden email]> 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.
>>