[rabbitmq-discuss] Strange behavior when accessing properties of a delivered message (in Java)
eric.arendt
ejarendt at gmail.com
Wed Aug 11 16:16:43 BST 2010
Thanks for the quick reply! Turns out someone wrote the equivalent of this
in a class I was using:
while (true) {
try {
// get next delivery
// process next delivery
} catch (Exception e) {
continue;
}
}
:thinking:
Thanks for your help!
- Eric
Matthias Radestock-3 wrote:
>
> Eric,
>
> eric.arendt wrote:
>> properties.getDeliveryMode();
>>
>> I don't get a null pointer, I don't get any kind of exception. Rather,
>> the
>> thread of execution either hangs, or in the case of a threaded
>> application,
>> restarts (as if this was a "GOTO" statement or something).
>
> The underlying implementation looks like this:
>
> public java.lang.Integer getDeliveryMode() { return deliveryMode;
> }
>
> So there is nothing peculiar going on there. Unless perhaps the delivery
> mode isn't set at all, in which case the above will return 'null', which
> if you tried to assign to an int would cause things to break.
>
>
> Regards,
>
> Matthias.
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
--
View this message in context: http://old.nabble.com/Strange-behavior-when-accessing-properties-of-a-delivered-message-%28in-Java%29-tp29403410p29409405.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
More information about the rabbitmq-discuss
mailing list