You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by chenta <ch...@gmail.com> on 2009/02/18 10:30:22 UTC
Sending message to specific client
How do I send a message to a specific client or a group of client when all of
the client subscribe to the same queue?
I encounter this problem because I do not want to create a queue for each
client. I think it will be a huge overhead for broker when I have more than
15K clients. Am I correct?
Because I am using C++ client so there is no JMS selector support. I don't
think it will be implemented by add an exchange plug-in. Where should I
start if I want to implement this feature?
B.R.
Chenta
--
View this message in context: http://n2.nabble.com/Sending-message-to-specific-client-tp2345847p2345847.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Sending message to specific client
Posted by Gordon Sim <gs...@redhat.com>.
chenta lee wrote:
> When we have 15K queue in one broker. Will the same message be duplicated
> 15k times if I using fanout exchange? or it will just use a pointer/ref to
> the message?
The actual message data will be not be copied, each queue will hold a
reference to it.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Sending message to specific client
Posted by chenta lee <ch...@gmail.com>.
When we have 15K queue in one broker. Will the same message be duplicated
15k times if I using fanout exchange? or it will just use a pointer/ref to
the message?
Thanks.
On Thu, Feb 19, 2009 at 1:09 AM, Gordon Sim <gs...@redhat.com> wrote:
> chenta wrote:
>
>> Thanks for your reply!
>>
>> On Wed, Feb 18, 2009 at 9:55 PM, Gordon Sim (via Nabble) <
>> ml-user+168305-199577682@n2.nabble.com<ml...@n2.nabble.com>
>> <ml...@n2.nabble.com>
>> >
>>
>>> wrote:
>>>
>>
>> chenta wrote:
>>>
>>>> How do I send a message to a specific client or a group of client when
>>>>
>>> all of
>>>
>>>> the client subscribe to the same queue?
>>>> I encounter this problem because I do not want to create a queue for
>>>>
>>> each
>>>
>>>> client. I think it will be a huge overhead for broker when I have more
>>>>
>>> than
>>>
>>>> 15K clients. Am I correct?
>>>>
>>> Are those queues going to be durable?
>>>
>>> If not having a per-client queue should be fine (even for 15k queues)
>>> and is the arguably the 'right' pattern if you want to communicate
>>> point-to-point.
>>>
>>
>>
>> It sounds like that creating a temporary is very cheap for Broker. Do you
>> know how many memory will be consume by one queue? or I can look into the
>> source code to figure it out later.
>>
>
> Hard to give an exact value for the memory overhead for the queue itself.
> The aggregate size of message data will be far more critical.
>
> As a quick experiment I just ran a test that declares 15k queues and the
> broker process is reported as using 90M of memory.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>
Re: Sending message to specific client
Posted by Gordon Sim <gs...@redhat.com>.
chenta wrote:
> Thanks for your reply!
>
> On Wed, Feb 18, 2009 at 9:55 PM, Gordon Sim (via Nabble) <
> ml-user+168305-199577682@n2.nabble.com<ml...@n2.nabble.com>
>> wrote:
>
>> chenta wrote:
>>> How do I send a message to a specific client or a group of client when
>> all of
>>> the client subscribe to the same queue?
>>> I encounter this problem because I do not want to create a queue for
>> each
>>> client. I think it will be a huge overhead for broker when I have more
>> than
>>> 15K clients. Am I correct?
>> Are those queues going to be durable?
>>
>> If not having a per-client queue should be fine (even for 15k queues)
>> and is the arguably the 'right' pattern if you want to communicate
>> point-to-point.
>
>
> It sounds like that creating a temporary is very cheap for Broker. Do you
> know how many memory will be consume by one queue? or I can look into the
> source code to figure it out later.
Hard to give an exact value for the memory overhead for the queue
itself. The aggregate size of message data will be far more critical.
As a quick experiment I just ran a test that declares 15k queues and the
broker process is reported as using 90M of memory.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Sending message to specific client
Posted by chenta <ch...@gmail.com>.
Thanks for your reply!
On Wed, Feb 18, 2009 at 9:55 PM, Gordon Sim (via Nabble) <
ml-user+168305-199577682@n2.nabble.com<ml...@n2.nabble.com>
> wrote:
> chenta wrote:
> > How do I send a message to a specific client or a group of client when
> all of
> > the client subscribe to the same queue?
> > I encounter this problem because I do not want to create a queue for
> each
> > client. I think it will be a huge overhead for broker when I have more
> than
> > 15K clients. Am I correct?
>
> Are those queues going to be durable?
>
> If not having a per-client queue should be fine (even for 15k queues)
> and is the arguably the 'right' pattern if you want to communicate
> point-to-point.
It sounds like that creating a temporary is very cheap for Broker. Do you
know how many memory will be consume by one queue? or I can look into the
source code to figure it out later.
>
>
> > Because I am using C++ client so there is no JMS selector support. I
> don't
> > think it will be implemented by add an exchange plug-in. Where should I
> > start if I want to implement this feature?
>
> I think the first task will be creating a parser and evaluator for the
> selector syntax. Once thats done the filtering can be hooked in to
> SemanticState::ConsumerImpl::filter in qpid/broker/SemanticState.cpp.
>
> Feel free to ask more detailed questions on the dev list, your
> contribution will be greatly valued!
>
> Jira for this issue: https://issues.apache.org/jira/browse/QPID-530
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2346969&i=0>
>
>
>
> ------------------------------
> This email is a reply to your post @
> http://n2.nabble.com/Sending-message-to-specific-client-tp2345847p2346969.html
> You can reply by email or by visting the link above.
>
>
--
View this message in context: http://n2.nabble.com/Sending-message-to-specific-client-tp2345847p2348035.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
Re: Sending message to specific client
Posted by Gordon Sim <gs...@redhat.com>.
chenta wrote:
> How do I send a message to a specific client or a group of client when all of
> the client subscribe to the same queue?
> I encounter this problem because I do not want to create a queue for each
> client. I think it will be a huge overhead for broker when I have more than
> 15K clients. Am I correct?
Are those queues going to be durable?
If not having a per-client queue should be fine (even for 15k queues)
and is the arguably the 'right' pattern if you want to communicate
point-to-point.
> Because I am using C++ client so there is no JMS selector support. I don't
> think it will be implemented by add an exchange plug-in. Where should I
> start if I want to implement this feature?
I think the first task will be creating a parser and evaluator for the
selector syntax. Once thats done the filtering can be hooked in to
SemanticState::ConsumerImpl::filter in qpid/broker/SemanticState.cpp.
Feel free to ask more detailed questions on the dev list, your
contribution will be greatly valued!
Jira for this issue: https://issues.apache.org/jira/browse/QPID-530
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
Re: Sending message to specific client
Posted by chenta <ch...@gmail.com>.
Thank you!
Server side selector is really different from client side selector.
Especially the exchanges can only route message to queue but not to the
client. And it will violate the spirit of MQ if we want to route message to
a specific client.
On Wed, Feb 18, 2009 at 9:57 PM, Jonathan Robie (via Nabble) <
ml-user+168300-1322749817@n2.nabble.com<ml...@n2.nabble.com>
> wrote:
> Someone else can comment on our overhead per queue, I have not measured
> that, I think we have good support for lots of queues.
>
> You can read a message without consuming it from the queue, and you can
> use Ttl ("time to live") to make a message expire when it is no longer
> relevant.
>
> The XML Exchange supports server side selectors. Currently, I *think* it
> requires the content to be XML. I told someone on Monday that I will
> test whether this is true and make it possible to route based on XQuery
> for messages that do not have XML in the message body.
>
> But use one queue per client first, the overhead is small, and it will
> be less complex.
>
> Hope this helps!
>
> Jonathan
>
> chenta wrote:
> > How do I send a message to a specific client or a group of client when
> all of
> > the client subscribe to the same queue?
> > I encounter this problem because I do not want to create a queue for
> each
> > client. I think it will be a huge overhead for broker when I have more
> than
> > 15K clients. Am I correct?
> >
> > Because I am using C++ client so there is no JMS selector support. I
> don't
> > think it will be implemented by add an exchange plug-in. Where should I
> > start if I want to implement this feature?
> >
> > B.R.
> > Chenta
> >
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project: http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@...<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2346976&i=0>
>
>
>
> ------------------------------
> This email is a reply to your post @
> http://n2.nabble.com/Sending-message-to-specific-client-tp2345847p2346976.html
> You can reply by email or by visting the link above.
>
>
--
View this message in context: http://n2.nabble.com/Sending-message-to-specific-client-tp2345847p2348098.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
Re: Sending message to specific client
Posted by Jonathan Robie <jo...@redhat.com>.
Someone else can comment on our overhead per queue, I have not measured
that, I think we have good support for lots of queues.
You can read a message without consuming it from the queue, and you can
use Ttl ("time to live") to make a message expire when it is no longer
relevant.
The XML Exchange supports server side selectors. Currently, I *think* it
requires the content to be XML. I told someone on Monday that I will
test whether this is true and make it possible to route based on XQuery
for messages that do not have XML in the message body.
But use one queue per client first, the overhead is small, and it will
be less complex.
Hope this helps!
Jonathan
chenta wrote:
> How do I send a message to a specific client or a group of client when all of
> the client subscribe to the same queue?
> I encounter this problem because I do not want to create a queue for each
> client. I think it will be a huge overhead for broker when I have more than
> 15K clients. Am I correct?
>
> Because I am using C++ client so there is no JMS selector support. I don't
> think it will be implemented by add an exchange plug-in. Where should I
> start if I want to implement this feature?
>
> B.R.
> Chenta
>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org