Good clarification Simon. Thank you! I apologize for my confusion.<div><br></div><div>I will look into the shovel worker. As I mentioned, I am modifying existing code so, that might be too much of a change in approach. (Whether or not it's the right approach!) </div>
<div><br></div><div>Thanks again!</div><div><br></div><div>Ryan<span></span><br><br>On Thursday, March 13, 2014, Simon MacMullen <<a href="mailto:simon@rabbitmq.com">simon@rabbitmq.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 13/03/14 12:57, Ryan Brown wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am attempting to modify an existing Erlang codebase that acts as a<br>
rest wrapper around rabbitmq providing some additional business logic.<br>
One of the new requirements is for the client to add a header to their<br>
request specifying if they want to use publish confirms or not. Our<br>
current implementation sets-up an exchange in a gen_server that does not<br>
use publish confirms and re-uses that exchange for all messages. Now I<br>
am trying to set-up a second exchange that does but am struggling.<br>
</blockquote>
<br>
Note that the question of whether you're using confirms is per-channel, not per-exchange.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Does anybody know of an example using publish confirms with Erlang<br>
client? Preferably from within a gen_server I can register as the<br>
confirm handler (self()).<br>
</blockquote>
<br>
Have a look at the shovel worker and what it does in ack_mode = on_confirm:<br>
<br>
<a href="http://hg.rabbitmq.com/rabbitmq-shovel/file/4323e6db74c8/src/rabbit_shovel_worker.erl" target="_blank">http://hg.rabbitmq.com/<u></u>rabbitmq-shovel/file/<u></u>4323e6db74c8/src/rabbit_<u></u>shovel_worker.erl</a><br>
<br>
Cheers, Simon<br>
<br>
-- <br>
Simon MacMullen<br>
RabbitMQ, Pivotal<br>
</blockquote></div><br><br>-- <br>-rb<br>