[openamq-dev] Content Based Routing

Martin Sustrik sustrik at imatix.com
Tue Sep 4 12:02:31 CEST 2007


Malinga,

>     I got your message everything is fine excpet this line "you bind the 
> queue to the amq.headers exchange once for each criteria you want to 
> match" how can i do that ?

Firstly, each messages should have its properties set. These are called 
"message headers". You can set them using amq_content_basic_set_headers. 
For manipulation of fields tables have a look here:

http://www.openamq.org/doc_wireapi.txt_flat.html#TOC28

When creating a binding to exchange of type 'headers' (e.g. amq.headers) 
there's a 'arguments' parameter in call to 
amq_client_session_queue_bind. This parameter should contain name-value 
pairs describing the matching criteria you would like to use.

Martin


More information about the openamq-dev mailing list