I recently reworked the internals of the library (thus the v2.0-beta tag) and have not updated the code in the examples/ directory yet.<div><br></div><div>So you are correct simple_connect.cpp is broken currently.<br><div>
<br></div><div>To clarify: It is safe and reliable to have more than one consumer per AmqpClient::Channel object.</div><div><br></div><div>-Alan<br><br><div class="gmail_quote">On Thu, Mar 8, 2012 at 11:37 AM, Lorenzo Rossi <span dir="ltr"><<a href="mailto:l.rossi.cons@vitrociset.it">l.rossi.cons@vitrociset.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="IT" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Dear expert,
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">As I told you yesterday I’m working on a C++ application who uses RabbitMQ. I have a simple question for you: related to Channel.h, function BasicConsume()
I read in the function comments<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">“Note: due to a limitation to how things are done, it is only possible to reliably have a single consumer per channel, calling this more than once
per channel may result in undefined results from BasicConsumeMessage”<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Is it something related only on the C++ implementation?
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Last but not least, I think there are some mistakes in the example simple_connect.cpp<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">#include <SimpleAmqpClient.h> should be #include < SimpleAmqpClient/SimpleAmqpClient.h> since the installation procedure copies that
file in the SimpleAmqpClient folder;<u></u><u></u></span></p>
<p><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">BasicMessage::ptr_t msg_out = channel->BasicConsumeMessage(); doesn’t work for two reasons:<u></u><u></u></span></p>
<p style="margin-left:72.0pt">
<u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>a.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">A function BasicConsumeMessage() which takes no argument doesn’t exist in Channel.h;<u></u><u></u></span></p>
<p style="margin-left:72.0pt">
<u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>b.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The function BasicConsumeMessage(…) currently defined in Channel.h returns a Envelope::ptr_t, not a BasicMessage::ptr_t.
<u></u><u></u></span></p>
<p><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><span>3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Header file SimpleAmqpClient.h includes unistd.h which is a POSIX header. I had to comment that row in order to make things work in Visual
Studio 2008. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Best wishes,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Lorenzo<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Lorenzo Rossi<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">_________________________________________<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Vitrociset S.p.A.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Via Tiburtina, 1020 - 00156 Roma - Italia<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d"><a href="tel:%2B39%2006%208820%203047" value="+390688203047" target="_blank">+39 06 8820 3047</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Questa e-mail ed ogni suo allegato sono confidenziali. Se li aveste ricevuti per errore, vogliate cortesemente darcene comunicazione subito e distruggere il messaggio ricevuto
erroneamente dal Vostro sistema informatizzato. Per piacere non li utilizzate per nessun fine, o diffondete il loro contenuto a nessun altra persona: fare ciò comporta violare le regole sulla privacy si cui al D. L.vo n. 196 /2003.
</span><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Grazie per la cooperazione.<u></u><u></u></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas;color:#1f497d">This e-mail and any attachment are confidential. If you have received them in error, you are on notice of their status. Please notify us immediately by replying
e-mail and then delete this message from your system. Please do not copy or use them for any purposes, or disclose their contents to any other person: to do so could be a breach of the Italian Privacy D. L.vo 196/2003.
</span></i><i><span style="font-size:10.5pt;font-family:Consolas;color:#1f497d">Thank you for your co-operation<u></u><u></u></span></i></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif"">Da:</span></b><span style="font-size:10.0pt;font-family:"Segoe UI","sans-serif""> Alan Antonuk [mailto:<a href="mailto:alan.antonuk@gmail.com" target="_blank">alan.antonuk@gmail.com</a>]
<br>
<b>Inviato:</b> martedì 6 marzo 2012 17:23<br>
<b>A:</b> Lorenzo Rossi<br>
<b>Cc:</b> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<b>Oggetto:</b> Re: [rabbitmq-discuss] how to build SimpleAmqpClient?<u></u><u></u></span></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Did you build boost as a set of static libraries? If so you'll need to set the Boost_USE_STATIC_LIBS=ON CMake variable.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">Another note: given you're building with VS2008 you're going to run into a different problem once you get past the boost library issue you're having: see this
<a href="https://github.com/alanxz/SimpleAmqpClient/issues/1" target="_blank">https://github.com/alanxz/SimpleAmqpClient/issues/1</a> for what the issue is and a workaround.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-Alan<u></u><u></u></p>
<div>
<p class="MsoNormal">On Tue, Mar 6, 2012 at 9:43 AM, Lorenzo Rossi <<a href="mailto:l.rossi.cons@vitrociset.it" target="_blank">l.rossi.cons@vitrociset.it</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">Dear Experts,</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to build SimpleAmqpClient (v2.0-beta-2) in Windows (VS 2008), but when I execute CMake, there are errors regarding boost:</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1128 (message):</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">Unable to find the requested Boost libraries.</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">Boost version: 1.48.0</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">Boost include path: C:/Applicazioni/boost</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">The following Boost libraries could not be found:</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">boost_chrono</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">boost_system</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">directory containing Boost libraries or BOOST_ROOT to the location of</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">Boost.</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US">Call Stack (most recent call first):</span><u></u><u></u></p>
<p style="margin:0cm;margin-bottom:.0001pt">CMakeLists.txt:8 (FIND_PACKAGE)<u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I add manually the filepath for chrono and system to Boost_Chrono_Library_Debug, Boost_Chrono_Library_Release, Boost_System_Library_Debug, Boost_ System_Library_Release,
but still it doesn’t find anything. I also create the BOOST_ROOT but still it doesn’t work.</span><u></u><u></u></p>
<p class="MsoNormal">Any suggestion?<u></u><u></u></p>
<p class="MsoNormal"><br>
Best,<u></u><u></u></p>
<p class="MsoNormal"><br>
Lorenzo<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Lorenzo Rossi</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">_________________________________________</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Vitrociset S.p.A.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Via Tiburtina, 1020 - 00156 Roma - Italia</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"><a href="tel:%2B39%2006%208820%203047" target="_blank">+39 06 8820 3047</a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:Consolas">Questa e-mail ed ogni suo allegato sono confidenziali. Se li aveste ricevuti per errore, vogliate cortesemente darcene comunicazione
subito e distruggere il messaggio ricevuto erroneamente dal Vostro sistema informatizzato. Per piacere non li utilizzate per nessun fine, o diffondete il loro contenuto a nessun altra persona: fare ciò comporta violare le regole sulla privacy si cui al D.
L.vo n. 196 /2003. </span><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas">Grazie per la cooperazione.</span><u></u><u></u></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:10.5pt;font-family:Consolas">This e-mail and any attachment are confidential. If you have received them in error, you are on notice of their
status. Please notify us immediately by replying e-mail and then delete this message from your system. Please do not copy or use them for any purposes, or disclose their contents to any other person: to do so could be a breach of the Italian Privacy D.
L.vo 196/2003. </span></i><i><span style="font-size:10.5pt;font-family:Consolas">Thank you for your co-operation</span></i><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div></div>