Nevermind, the MessageService pushMessageToClients(Set subscriberIds,
Message message, boolean evalSelector) method does the job.

Dirk.

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dirk Eismann
> Sent: Thursday, February 08, 2007 9:17 AM
> To: [email protected]
> Subject: [flexcoders] FDS: Using DSDstClientId to send 
> AsyncMessages to specific client
> 
> I try to send an AsyncMessage from a server side class to a 
> specific client. What I came up with so far is to use the 
> routeMessageToService() method of the MessageBroker class and 
> set the DESTINATION_CLIENT_ID_HEADER header of the 
> AsyncMessage to the clientId of the connected Consumer. 
> 
> This seems to work nicely: when two clients are connected and 
> the AsyncMessage gets send to only one client the client side 
> MessageEvent is firing on the correct client. However, 
> looking at the debug log files of FDS it seems as if FDS is 
> still broadcasting to all clients and not to this one single client.
> 
> Client A uses clientId BA4BF98AFABE9C4F371BD848028E5272 
> Client B uses clientId 74393AD2A49264914F8E67267BE0F38F
> 
> Although I set the DSDstClientId in the AsyncMessage's header to
> BA4BF98AFABE9C4F371BD848028E5272 the log file looks like this:
> 
> [Flex] 02/08/2007 09:07:06.237 [DEBUG] [Message.General] 
> Sending message to client: BA4BF98AFABE9C4F371BD848028E5272
>   message: Flex Message (flex.messaging.messages.AsyncMessage) 
>     clientId = 9794A55D-AD09-8B04-508C-53D590C86FB4
>     correlationId = null
>     destination = j2flex.messaging
>     messageId = 9794A55D-AD1B-3259-24AB-F846177AF243
>     timestamp = 1170922026237
>     timeToLive = 0
>     body = [EMAIL PROTECTED]
>     hdr(DSDstClientId) = BA4BF98AFABE9C4F371BD848028E5272
> 
> [Flex] 02/08/2007 09:07:06.237 [DEBUG] [Message.General] 
> Sending message to client: 74393AD2A49264914F8E67267BE0F38F
>   message: Flex Message (flex.messaging.messages.AsyncMessage) 
>     clientId = 9794A55D-AD09-8B04-508C-53D590C86FB4
>     correlationId = null
>     destination = j2flex.messaging
>     messageId = 9794A55D-AD1B-3259-24AB-F846177AF243
>     timestamp = 1170922026237
>     timeToLive = 0
>     body = [EMAIL PROTECTED]
>     hdr(DSDstClientId) = BA4BF98AFABE9C4F371BD848028E5272
> 
> 
> Seems as if the DSDstClientId is only evaluated on the client 
> side so this still is just a broadcast, right?
> 
> Dirk.
> 
> 
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: 
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
> 
> 
> 
> 

Reply via email to