[openamq-dev] missing routing key
Tsyganov, Dmitri
Dmitri.Tsyganov at dowjones.com
Tue Feb 19 17:28:34 CET 2008
Thanks for the update, I will apply the patch!
Dmitri
-----Original Message-----
From: openamq-dev-bounces at lists.openamq.org
[mailto:openamq-dev-bounces at lists.openamq.org] On Behalf Of Pieter
Hintjens
Sent: Sunday, February 17, 2008 12:43 PM
To: OpenAMQ development discussion
Subject: Re: [openamq-dev] missing routing key
On Feb 11, 2008 9:28 PM, Dmitri Tsyganov <dmitri.tsyganov at dowjones.com>
wrote:
> When my client app connects to a broker in claster_mta configuration,
I
> can't retrieve routing key from the message. I am using
> amq_content_basic_get_routing_key API
OK, found the problem. Routing keys are taken from the content
properties, which were not being properly set on forwarded messages.
Here is a patch you can apply to the OpenAMQ code to fix the bug:
In openamq/server:
--- amq_cluster_mta.icl (revision 10964)
+++ amq_cluster_mta.icl (working copy)
@@ -200,6 +205,12 @@
client_method->content = peer_method->content;
peer_method->content = NULL;
+ amq_content_basic_set_routing_key (
+ client_method->content,
+ peer_method->payload.basic_deliver.exchange,
+ peer_method->payload.basic_deliver.routing_key,
+ 0);
+
amq_exchange_publish (self->exchange, NULL,
(amq_server_method_t *) client_method);
amq_client_method_unlink (&client_method);
}
To rebuild, do "boom regen build install" in openamq/server.
-Pieter
_______________________________________________
openamq-dev mailing list
openamq-dev at lists.openamq.org
http://lists.openamq.org/mailman/listinfo/openamq-dev
More information about the openamq-dev
mailing list