[rabbitmq-discuss] ReturnListener is not invoked
Dmitriy Bannikov
dmitriy.bannikov at gmail.com
Fri Jan 18 20:18:58 GMT 2013
I think it's a problem of this particular instance. I've downgraded
RabbitMQ to 2.8.7, and still have same behavior - no reaction to invalid
action, no errors at all.
I've checked RabbitMQ logs - nothing related to my actions.
I've executed "rabbitmqctl status" to ensure that version is correct:
rabbitmqctl status
Status of node 'rabbit at ip-10-182-22-183' ...
[{pid,30523},
{running_applications,[{rabbit,"RabbitMQ","2.8.7"},
{os_mon,"CPO CXC 138 46","2.2.10"},
{sasl,"SASL CXC 138 11","2.2.1"},
{mnesia,"MNESIA CXC 138 12","4.7.1"},
{stdlib,"ERTS CXC 138 10","1.18.2"},
{kernel,"ERTS CXC 138 10","2.15.2"}]},
{os,{unix,linux}},
{erlang_version,"Erlang R15B02 (erts-5.9.2) [source] [64-bit] [smp:2:2]
[async-threads:30] [hipe] [kernel-poll:true]\n"},
{memory,[{total,27509232},
{processes,10481394},
{processes_used,10481380},
{system,17027838},
{atom,504409},
{atom_used,476697},
{binary,640152},
{code,11973387},
{ets,823696}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,3221225472},
{disk_free_limit,1000000000},
{disk_free,267063296},
{file_descriptors,[{total_limit,924},
{total_used,4},
{sockets_limit,829},
{sockets_used,2}]},
{processes,[{limit,1048576},{used,127}]},
{run_queue,0},
{uptime,173}]
...done.
Is there anything else I can check?
2013/1/17 Matthias Radestock <matthias at rabbitmq.com>
> On 17/01/13 23:04, Dmitriy Bannikov wrote:
>
>> I've created a test Java class which tries to publish message into a
>> fake queue.
>> In Windows this message is failing, and ReturnListener shows it's
>> output. In Linux there're not error or fails.
>>
>> I've just upgraded rabbitmq from 2.8.6 to 3.0.1 on both WIndows and
>> Linux machines.
>>
>> Code is following: [...]
>> channel.basicPublish("", "fake_queue_112233", true, true,
>> props, "Test String".getBytes());
>>
>
> That call has the 'immediate' flag set. The RabbitMQ server stopped
> supporting that in 3.0.0, so the above will result in an connection-level
> error.
>
> But since publishing is asynchronous, a client won't see that error unless
> it a) stays around long enough for the error to arrive, and b) either
> performs some other action on the channel or has an appropriate error
> handler (in case of the Java client a ShutdownListener) configured on the
> channel. Since the basicPublish is the last thing your program does, and no
> handler is installed, the error won't show up. And since the error that is
> generated is a connection level error, the connection will be closed and
> the program terminates. If you, say, added a connection.close() at the end
> of your program, you'd get an error.
>
> Now, if you were just setting mandatory, or running 2.8.6 (where
> 'immediate' doesn't result in an error) then the return listener should get
> invoked. And since a return is a not an error, the connection will stay
> alive and the program won't terminate. Indeed all that happens for me, on
> Linux, when I try it.
>
> As to why this would behave differently on windows and linux, I suspect
> the upgrade of the broker didn't actually happen on the former, so it's
> still running 2.8.6.
>
> Regards,
>
> Matthias.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130118/d683b407/attachment.htm>
More information about the rabbitmq-discuss
mailing list