<div dir="ltr">I guess setConfirmListener is deprecated. It's now addConfirmListener.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 26, 2014 at 12:21 PM, cw storm <span dir="ltr"><<a href="mailto:cwstorm@gmail.com" target="_blank">cwstorm@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 dir="ltr">I've added the channel.setConfirmListener(new ConfirmListener() and imported <span style="font-size:13px">com</span><span style="font-size:13px;color:rgb(102,102,0)">.</span><span style="font-size:13px">rabbitmq</span><span style="font-size:13px;color:rgb(102,102,0)">.</span><span style="font-size:13px">client</span><span style="font-size:13px;color:rgb(102,102,0)">.</span><span style="font-size:13px;color:rgb(102,0,102)">ConfirmListener but during java compilation, it complains :</span><div>
<span style="font-size:13px;color:rgb(102,0,102)"><br></span></div><div><span style="font-size:13px;color:rgb(102,0,102)"><div>cannot find symbol</div><div>symbol : method setConfirmListener(<anonymous com.rabbitmq.client.ConfirmListener>)</div>
<div>location: interface com.rabbitmq.client.Channel</div><div><span style="white-space:pre-wrap"> </span>channel.setConfirmListener(new ConfirmListener()</div></span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
<div><div class="h5">
On Wed, Feb 26, 2014 at 11:43 AM, Jerry Kuch <span dir="ltr"><<a href="mailto:jkuch@gopivotal.com" target="_blank">jkuch@gopivotal.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Currently, my publisher code instantiate a connection/channel and closes it if all successful. Is it possible to reuse an existing connection but have separate channel every time produces a message to rabbit?<br>
</div></div></blockquote><div><br></div></div><div>It's not clear why you would want to create a new channel per message. Typically one gets a connection, then multiplexes it into separate channels and uses each channel for some conceptually related chunk of behavior, e.g. publishing notifications of some sort, consuming messages, etc. </div>
<div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div>
<div>Also, after the basicPublish is executed, what do I check in the next line of code to make sure the broker have persisted or receive the message successfully.<br></div></div></blockquote><div><br></div></div><div>If you want such an assurance you'll either have to perform that publish with the context of an AMQP transaction (synchronous and kind of expensive) or use publisher confirms, in which case you register an asynchronous listener for confirm receipts that the broker sends when it's done what you asked for, to the standard you asked.</div>
<div><br></div></div></div></div>
<br></div></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>
<br></blockquote></div><br></div>
</blockquote></div><br></div>