<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 11"><meta name="Originator" content="Microsoft Word 11"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CMRAMAM%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
 </w:LatentStyles>
</xml><![endif]--><style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ansi-language:#0400;
        mso-fareast-language:#0400;
        mso-bidi-language:#0400;}
</style>
<![endif]--><pre>Hi Ben,</pre><pre><o:p>&nbsp;</o:p></pre><pre>Thank you for the reply. I am working on this application to achieve the business goal. It’s the real thing! </pre><pre><o:p>&nbsp;</o:p></pre><pre>The idea is to have chat inside my iPhone application. iPhone app interacts with my server code to get the list of friends and their presence. iPhone displays all friends in the chat window, user can pick a friend and chat with him/her. </pre><pre><o:p>&nbsp;</o:p></pre><pre>Whenever the chat message is routed thru RabbitMQ server and if there is no ack from the friend, program can check the application server for the presence and let the user knows if his friend is offline. </pre><pre><o:p>&nbsp;</o:p></pre><pre>I think I can avoid using XMPP gateway on top of RabbitMQ. </pre><pre><o:p>&nbsp;</o:p></pre><pre>I don’t quite understand about default exchange you mentioned. I didn’t even know there is a default exchange. Can I use this default
 exchange for both one-to-one chat and multi-user chat? </pre><pre><o:p>&nbsp;</o:p></pre><pre>I am using different queues for both of these chat types. There will be only one queue for mult-user chat, each user will read from it and write into it. For one-to-one chat, each user will have his/her own queue. If I want to send message to my friend, I will send message to his queue, then he read from there. When he wants to send message to me, he will put his message in my queue, I will take it from there. </pre><pre><o:p>&nbsp;</o:p></pre><pre>I assumed that I need to have separate exchanges for different chat types. It appears that I can use the same exchange. Is there any user/message limit on each exchange?</pre><pre><o:p>&nbsp;</o:p></pre><pre>Thanks again for taking time to answer my queries.</pre><pre><o:p>&nbsp;</o:p></pre><pre>Ram</pre><pre><o:p>&nbsp;</o:p></pre></div><div style="font-family: times new roman,new york,times,serif; font-size:
 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Ben Hood &lt;0x6e6562@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> Ram Muthiah &lt;ram.muthiah@yahoo.com&gt;<br><b><span style="font-weight: bold;">Cc:</span></b> rabbitmq &lt;rabbitmq-discuss@lists.rabbitmq.com&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Thursday, August 27, 2009 5:22:05 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [rabbitmq-discuss] building chat<br></font><br>Ram,<br><br>On Thu, Aug 27, 2009 at 3:05 AM, Ram Muthiah&lt;<a ymailto="mailto:ram.muthiah@yahoo.com" href="mailto:ram.muthiah@yahoo.com">ram.muthiah@yahoo.com</a>&gt; wrote:<br>&gt; Based on Ben and Alexis's discussion, I came up with the following logic.<br>&gt; Let me know if you guys see any flaw in it. I use two exchanges; one for<br>&gt;
 one-to-one chat and another for multi-user chat. Clients will use Java. I<br>&gt; create one queue per user. Effectively, there will be two queues per chat.<br><br>Fundamentally I don't see that much wrong with it. However I am<br>wondering what your intention is - do you need an application to<br>achieve a business goal or are you just getting your feet wet with<br>AMQP?<br><br>Here are some study notes:<br><br>- If you want to route directly to a named queue, you can publish to<br>the default exchange (In Java this an empty string as a name) with the<br>name of the queue as a routing key. No need to create an extra<br>exchange for this;<br><br>- How is your application going to know about the non-acknowledgement<br>of messages on the outbound side (this is where you expect the client<br>to display the "user offline")? Seems to me that you need presence to<br>do this (i.e. the 1st P in XMPP).<br><br>Cheers,<br><br>Ben<br></div></div></div><br>

      </body></html>