<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Tim. I'm using this:<div><br></div><div>handle_info({#'basic.consume'{exchange=_Exchange, routing_key=_Key}, Packet}, State) -></div><div><br></div><div>For receiving messages from RabbitMQ… Does that look about right?</div><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:24, Tim Watson <<a href="mailto:watson.timothy@gmail.com">watson.timothy@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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><br>On 17 Apr 2013, at 20:08, Tim Watson <<a href="mailto:watson.timothy@gmail.com">watson.timothy@gmail.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><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">lee.sylvester@gmail.com</a>> wrote:<br><br></div><div><span></span></div><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252">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">videlalvaro@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><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">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">rabbitmq-discuss@lists.rabbitmq.com</a><br><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br></blockquote></div><br></div></blockquote><blockquote type="cite"><span>_______________________________________________</span><br><span>rabbitmq-discuss mailing list</span><br><span><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a></span><br><span><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></span><br></blockquote></blockquote><blockquote type="cite"><span>_______________________________________________</span><br><span>rabbitmq-discuss mailing list</span><br><span><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a></span><br><span><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a></span><br></blockquote></div>_______________________________________________<br>rabbitmq-discuss mailing list<br><a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss<br></blockquote></div><br></div></body></html>