<div dir="ltr"><div style>Apart from what Tim have just said:</div><div><br></div>An AMQP message in Erlang: <a href="http://hg.rabbitmq.com/rabbitmq-erlang-client/file/717e6ab8b95b/include/amqp_client.hrl#l23">http://hg.rabbitmq.com/rabbitmq-erlang-client/file/717e6ab8b95b/include/amqp_client.hrl#l23</a><div>
<br></div><div style>And here are several handle_info callbacks for a gen_server <a href="http://hg.rabbitmq.com/rabbitmq-erlang-client/file/717e6ab8b95b/src/amqp_rpc_client.erl#l160">http://hg.rabbitmq.com/rabbitmq-erlang-client/file/717e6ab8b95b/src/amqp_rpc_client.erl#l160</a></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 9:24 PM, Tim Watson <span dir="ltr"><<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF"><div>Oh and specifically, the messages will be records, see the header files for details.<br><br>
Cheers,</div><div>Tim</div><div><div class="h5"><div><br>On 17 Apr 2013, at 20:08, Tim Watson <<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite">
<div><div>Hi again Lee - just responded on erlang-questions. Take a look at amqp_gen_consumer. It does what you're trying to do so you can either use it as a template or just code your consumer process using it's behaviour instead of gen_server's.</div>
<div><br></div><div>Cheers,</div><div>Tim</div><div><br>On 17 Apr 2013, at 20:04, Lee Sylvester <<a href="mailto:lee.sylvester@gmail.com" target="_blank">lee.sylvester@gmail.com</a>> wrote:<br><br></div><div><span></span></div>
<blockquote type="cite"><div>Thank you, Alvaro… However, do you know what the structure of Info is for RabbitMQ messages? Or is it simply the message binary?<div><br></div><div>Thanks,</div><div>Lee</div><div><br></div><div>
<br></div><div><br><div><div>On 17 Apr 2013, at 20:00, Alvaro Videla <<a href="mailto:videlalvaro@gmail.com" target="_blank">videlalvaro@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div dir="ltr">Yes, it's possible. Use handle_info in your gen_server behaviour and then pattern match on the parameters.<div>
<br></div><div>handle_info is used for messages that are sent to the process but that are not part of the gen_server API.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 8:54 PM, Lee Sylvester <span dir="ltr"><<a href="mailto:lee.sylvester@gmail.com" target="_blank">lee.sylvester@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey guys,<br>
<br>
So, I'm using RabbitMQ with Erlang. Does anyone know how I'd receive messages through amqp_client using OTP? The examples only show using a loop with the receive, whereas I'd like to avoid an actual loop where possible.<br>
<br>
Thanks,<br>
Lee<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><br>
</blockquote></div><br></div>
_______________________________________________<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><br>
</blockquote></div><br></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>rabbitmq-discuss mailing list</span><br><span><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a></span><br>
<span><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></span><br></div></blockquote></div></blockquote>
<blockquote type="cite"><div><span>_______________________________________________</span><br><span>rabbitmq-discuss mailing list</span><br><span><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a></span><br>
<span><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></span><br></div></blockquote></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>