No subject
Sun Jun 17 23:12:48 BST 2012
could be something totally different.
Application creates multiple Connection/Channel pairs and each is assigned
its own Consumer instance.
We have a single consumer per channel per connection.
Here's a snippet of code from Consumer.handleDelivery() method modified to
remove business specific information.
But this is the gist of what happens when a message is received.
public final void handleDelivery(String consumerTag, Envelope envelope,
BasicProperties properties, byte[] body) throws IOException {
boolean failed = false;
Throwable failureReason = null;
try {
// create a delivery for the client
delivery = createDelivery(consumerTag, body, envelope,
properties);
// deliver to client
deliveryHandler.handleDelivery(delivery);
} catch (Throwable e) {
// client had a problem handling/processing delivery
failed = true;
failureReason = e;
log.error("Client failed while handling delivery. "
+ e.getMessage(), e);
} finally {
if (failed) {
handleFailedDelivery(
failureReason, body, properties);
} else {
try {
acknowledge(envelope.getDeliveryTag());
} catch (Exception e) {
notifyClient(e);
}
}
}
}
Envelope object that is handed to the method as an argument stays method
local.
Our application is connecting to the cluster through a netscaler VIP.
We have not seen this problem when consuming from a local cluster with the
same application.
Any help or pointer in the right direction is appreciated.
Thanks,
Vineet
--f46d0438936f1737cf04c6caa103
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: base64
SGVsbG8sPGJyPjxicj5XZSBhcmUgdXNpbmcgcmFiYml0IGNsdXN0ZXIgZm9yIGEgZmV3IG1vbnRo
cyBub3cgYW5kIHRoaW5ncyBoYXZlIGJlZW4gd29ya2luZyBmaW5lIHVudGlsIG5vdy48YnI+PGJy
PkVOVklPUk5NRU5UPGJyPj09PT09PT09PT09PT08YnI+UmFiYml0TVEgU2VydmVyIHZlcnNpb24g
Mi44LjI8YnI+UmFiYml0TVEgQ2xpZW50IDIuNy4xPGJyPjxicj5PbmUgb2Ygb3VyIGFwcGxpY2F0
aW9ucyBpcyBjb25zdW1pbmcgbWVzc2FnZXMgZnJvbSBSYWJiaXRNUSBzZXJ2ZXIgb3ZlciBXQU4u
PGJyPgpUaGlzIHdhcyBhIHJlY2VudCBpbnRyb2R1Y3Rpb24gaS5lLiBnb2luZyBvdmVyIF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