Thanks Marek,<br><br>Every day's a school day. I didn't know about the mandatory flag.<br><br>HOWEVER... Having added to the code below, I still don't get and indication of error. Stepping into the tx_commit code, I see what looks like a Tx.CommitOK message back from the server. I've double-verified that the queue I'm sending to doesn't exist.<br>
<br>Matt<br><br><div class="gmail_quote">On Thu, Mar 29, 2012 at 3:52 AM, Marek Majkowski <span dir="ltr"><<a href="mailto:majek04@gmail.com">majek04@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 class="HOEnZb"><div class="h5">On Thu, Mar 29, 2012 at 01:16, Matt Pietrek <<a href="mailto:mpietrek@skytap.com">mpietrek@skytap.com</a>> wrote:<br>
> I have a Pika code sequence that looks like this:<br>
><br>
> channel = self._channel<br>
> channel.tx_select()<br>
> channel.basic_publish(exchange='',<br>
> routing_key=queue_name,<br>
> body=json_string,<br>
> properties=pika.BasicProperties(delivery_mode=2))<br>
> channel.tx_commit()<br>
><br>
> During some robustness testing, I found that if I passed an invalid queue<br>
> name to basic_get, I get an AMQPChannelError as expected. However, when<br>
> using the above code to write a message to an invalid queue name, no<br>
> exception is seen.<br>
><br>
> Is this normal or am I missing something? In our scenario, we have to<br>
> absolutely, positively know that the message was received by the broker.<br>
<br>
</div></div>Yes, this is normal.<br>
<br>
AMQP does not allow you to send message to a "queue", instead, you<br>
send a message to an exchange with a routing key.<br>
<br>
This routing key is a queue name in this case but it can be just anything.<br>
<br>
Messages sent with a routing key that is not matched by appropriate<br>
binding will be lost. This is the correct behaviour.<br>
<br>
If you need to ensure that message is delivered use 'mandatory' flag<br>
on basic.publish:<br>
<a href="http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.publish" target="_blank">http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.publish</a><br>
<br>
Cheers,<br>
Marek<br>
</blockquote></div><br>