From users-return-23694-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Wed May 19 08:23:28 2010
Return-Path:
Delivered-To: apmail-activemq-users-archive@www.apache.org
Received: (qmail 3887 invoked from network); 19 May 2010 08:23:28 -0000
Received: from unknown (HELO mail.apache.org) (140.211.11.3)
by 140.211.11.9 with SMTP; 19 May 2010 08:23:28 -0000
Received: (qmail 76122 invoked by uid 500); 19 May 2010 08:23:27 -0000
Delivered-To: apmail-activemq-users-archive@activemq.apache.org
Received: (qmail 76026 invoked by uid 500); 19 May 2010 08:23:27 -0000
Mailing-List: contact users-help@activemq.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: users@activemq.apache.org
Delivered-To: mailing list users@activemq.apache.org
Received: (qmail 76018 invoked by uid 99); 19 May 2010 08:23:27 -0000
Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 May 2010 08:23:27 +0000
X-ASF-Spam-Status: No, hits=-2.3 required=10.0
tests=RCVD_IN_DNSWL_MED,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: domain of Cristian.Botiza@endava.com designates 85.158.139.163 as permitted sender)
Received: from [85.158.139.163] (HELO mail188.messagelabs.com) (85.158.139.163)
by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 May 2010 08:23:18 +0000
X-VirusChecked: Checked
X-Env-Sender: Cristian.Botiza@endava.com
X-Msg-Ref: server-14.tower-188.messagelabs.com!1274257376!49017504!1
X-StarScan-Version: 6.2.4; banners=-,-,-
X-Originating-IP: [194.126.146.10]
Received: (qmail 26912 invoked from network); 19 May 2010 08:22:58 -0000
Received: from smtp.ro.endava.com (HELO smtp.ro.endava.com) (194.126.146.10)
by server-14.tower-188.messagelabs.com with RC4-SHA encrypted SMTP; 19 May 2010 08:22:58 -0000
Received: from rocjexm01.endava.net ([192.168.115.6]) by rocjexm01.endava.net
([192.168.115.6]) with mapi; Wed, 19 May 2010 11:22:56 +0300
From: Cristian Botiza
To: "users@activemq.apache.org"
Date: Wed, 19 May 2010 11:22:56 +0300
Subject: RE: How to post message to a certain queue consumer?
Thread-Topic: How to post message to a certain queue consumer?
Thread-Index: Acr280I9SuHGX57wQy6uW3j+ciaN+gAOECv8
Message-ID: <0669EB61C3BF9143AF3D7BE84DF29B5202D9770D05@rocjexm01.endava.net>
References: <28592826.post@talk.nabble.com>
<0669EB61C3BF9143AF3D7BE84DF29B5202D9770CFF@rocjexm01.endava.net>
<28593473.post@talk.nabble.com>
<0669EB61C3BF9143AF3D7BE84DF29B5202D9770D02@rocjexm01.endava.net>
<28597231.post@talk.nabble.com>
<0669EB61C3BF9143AF3D7BE84DF29B5202D9770D04@rocjexm01.endava.net>,<28603302.post@talk.nabble.com>
In-Reply-To: <28603302.post@talk.nabble.com>
Accept-Language: en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Virus-Checked: Checked by ClamAV on apache.org
Session session =3D ...;
MessageProducer producer =3D session.createProducer(destination);
producer.setTimeToLive(timeToLiveInMilliseconds); //use the producer API to=
set TTL
Message message =3D session.create...Message(...);
producer.send(message);
TTL has nothing to do with message selectors; I found it useful though.
________________________________________
From: alanchb [alanchbmail@gmail.com]
Sent: 19 May 2010 04:32
To: users@activemq.apache.org
Subject: RE: How to post message to a certain queue consumer?
Yes,it works well.
But I work with Visual C#,the method is a little different from yours.
Can you give me some guide about TTL you mentioned in early reply?
Cristian Botiza wrote:
>
> This is not AMQ specific; it's rather JMS API specific - the JavaDoc of
> interface javax.jms.Message.
> Did this approach work with P2P and multiple consumers?
>
> ________________________________________
> From: alanchb [alanchbmail@gmail.com]
> Sent: 18 May 2010 18:08
> To: users@activemq.apache.org
> Subject: RE: How to post message to a certain queue consumer?
>
> thanks a lot! that's exactly what i need.
> but if i did not post the question here and get your kind reply,i will
> never
> think of using the method message.setStringProperty to set message
> selector.how do you konw this?is there any shortcut to learn about
> ActiveMQ?
>
>
> Cristian Botiza wrote:
>>
>> In the producer code, when creating the Message object:
>>
>> message.setStringProperty("myFilterProperty", "my consumerID");
>>
>> In the consumer (QueueReceiver or Message Driven Bean), define the
>> message
>> selector expression (SQL syntax) as myFilterPropert=3D'my consumerID'
>>
>> ActiveMQ should dispatch only the messages matching the filter. Others
>> will stay in the queue, I would also set the TTL in the producer
>> (optional
>> though).
>>
>> ________________________________________
>> From: alanchb [alanchbmail@gmail.com]
>> Sent: 18 May 2010 12:24
>> To: users@activemq.apache.org
>> Subject: RE: How to post message to a certain queue consumer?
>>
>> Thanks for your reply.
>>
>> but how to use message selector to identify a consumer when producer sen=
d
>> a
>> message?
>>
>>
>> Cristian Botiza wrote:
>>>
>>> Message selectors?
>>>
>>> ________________________________________
>>> From: alanchb [alanchbmail@gmail.com]
>>> Sent: 18 May 2010 11:12
>>> To: users@activemq.apache.org
>>> Subject: How to post message to a certain queue consumer?
>>>
>>> under the P2P mode,if i have sevaral queue consumers,how to make the
>>> producer
>>> post message to the consumer he wants?
>>> --
>>> View this message in context:
>>> http://old.nabble.com/How-to-post-message-to-a-certain-queue-consumer--=
tp28592826p28592826.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>> The information in this email is confidential and may be legally
>>> privileged. It is intended solely for the addressee. Any opinions
>>> expressed are mine and do not necessarily represent the opinions of the
>>> Company. Emails are susceptible to interference. If you are not the
>>> intended recipient, any disclosure, copying, distribution or any action
>>> taken or omitted to be taken in reliance on it, is strictly prohibited
>>> and
>>> may be unlawful. If you have received this message in error, do not ope=
n
>>> any attachments but please notify the EndavaIT Service Desk on (+44
>>> (0)870
>>> 423 0187), and delete this message from your system. The sender accepts
>>> no
>>> responsibility for information, errors or omissions in this email, or
>>> for
>>> its use or misuse, or for any act committed or omitted in connection
>>> with
>>> this communication. If in doubt, please verify the authenticity of the
>>> contents with the sender. Please rely on your own virus checkers as no
>>> responsibility is taken by the sender for any damage rising out of any
>>> bug
>>> or virus infection.
>>>
>>> Endava Limited is a company registered in England under company number
>>> 5722669 whose registered office is at 125 Old Broad Street, London, EC2=
N
>>> 1AR, United Kingdom. Endava Limited is the Endava group holding company
>>> and does not provide any services to clients. Each of Endava Limited an=
d
>>> its subsidiaries is a separate legal entity and has no liability for
>>> another such entity's acts or omissions. Please refer to the =93Legal=
=94
>>> section on our website for a list of legal entities.
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/How-to-post-message-to-a-certain-queue-consumer--t=
p28592826p28593473.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>> The information in this email is confidential and may be legally
>> privileged. It is intended solely for the addressee. Any opinions
>> expressed are mine and do not necessarily represent the opinions of the
>> Company. Emails are susceptible to interference. If you are not the
>> intended recipient, any disclosure, copying, distribution or any action
>> taken or omitted to be taken in reliance on it, is strictly prohibited
>> and
>> may be unlawful. If you have received this message in error, do not open
>> any attachments but please notify the EndavaIT Service Desk on (+44
>> (0)870
>> 423 0187), and delete this message from your system. The sender accepts
>> no
>> responsibility for information, errors or omissions in this email, or fo=
r
>> its use or misuse, or for any act committed or omitted in connection wit=
h
>> this communication. If in doubt, please verify the authenticity of the
>> contents with the sender. Please rely on your own virus checkers as no
>> responsibility is taken by the sender for any damage rising out of any
>> bug
>> or virus infection.
>>
>> Endava Limited is a company registered in England under company number
>> 5722669 whose registered office is at 125 Old Broad Street, London, EC2N
>> 1AR, United Kingdom. Endava Limited is the Endava group holding company
>> and does not provide any services to clients. Each of Endava Limited and
>> its subsidiaries is a separate legal entity and has no liability for
>> another such entity's acts or omissions. Please refer to the =93Legal=94
>> section on our website for a list of legal entities.
>>
>>
>
> --
> View this message in context:
> http://old.nabble.com/How-to-post-message-to-a-certain-queue-consumer--tp=
28592826p28597231.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
> The information in this email is confidential and may be legally
> privileged. It is intended solely for the addressee. Any opinions
> expressed are mine and do not necessarily represent the opinions of the
> Company. Emails are susceptible to interference. If you are not the
> intended recipient, any disclosure, copying, distribution or any action
> taken or omitted to be taken in reliance on it, is strictly prohibited an=
d
> may be unlawful. If you have received this message in error, do not open
> any attachments but please notify the EndavaIT Service Desk on (+44 (0)87=
0
> 423 0187), and delete this message from your system. The sender accepts n=
o
> responsibility for information, errors or omissions in this email, or for
> its use or misuse, or for any act committed or omitted in connection with
> this communication. If in doubt, please verify the authenticity of the
> contents with the sender. Please rely on your own virus checkers as no
> responsibility is taken by the sender for any damage rising out of any bu=
g
> or virus infection.
>
> Endava Limited is a company registered in England under company number
> 5722669 whose registered office is at 125 Old Broad Street, London, EC2N
> 1AR, United Kingdom. Endava Limited is the Endava group holding company
> and does not provide any services to clients. Each of Endava Limited and
> its subsidiaries is a separate legal entity and has no liability for
> another such entity's acts or omissions. Please refer to the =93Legal=94
> section on our website for a list of legal entities.
>
>
--
View this message in context: http://old.nabble.com/How-to-post-message-to-=
a-certain-queue-consumer--tp28592826p28603302.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
The information in this email is confidential and may be legally privileged=
. It is intended solely for the addressee. Any opinions expressed are mine =
and do not necessarily represent the opinions of the Company. Emails are su=
sceptible to interference. If you are not the intended recipient, any discl=
osure, copying, distribution or any action taken or omitted to be taken in =
reliance on it, is strictly prohibited and may be unlawful. If you have rec=
eived this message in error, do not open any attachments but please notify =
the EndavaIT Service Desk on (+44 (0)870 423 0187), and delete this message=
from your system. The sender accepts no responsibility for information, er=
rors or omissions in this email, or for its use or misuse, or for any act c=
ommitted or omitted in connection with this communication. If in doubt, ple=
ase verify the authenticity of the contents with the sender. Please rely on=
your own virus checkers as no responsibility is taken by the sender for an=
y damage rising out of any bug or virus infection.
Endava Limited is a company registered in England under company number 5722=
669 whose registered office is at 125 Old Broad Street, London, EC2N 1AR, U=
nited Kingdom. Endava Limited is the Endava group holding company and does =
not provide any services to clients. Each of Endava Limited and its subsidi=
aries is a separate legal entity and has no liability for another such enti=
ty's acts or omissions. Please refer to the =93Legal=94 section on our webs=
ite for a list of legal entities.