Hi Dominic

unfortunately, it 's does not work!!
I try your idea, see my code (I move the pn_link_detach() and pn_link_open()
in all my code, but .....)
Here my code:

// Init one time to use many time
pn_messenger_t* msgConsumer= pn_messenger(NULL);
pn_messenger_set_timeout (msgConsumer, 1000);
pn_messenger_set_blocking (msgConsumer, true);
pn_messenger_set_incoming_window (msgConsumer, 1);

// After in a method
pn_link_t* link = pn_messenger_get_link(msgConsumer,
("amqp://").c_str(), false);


pn_terminus_t* terminus = pn_link_source(link);
pn_data_t* data = pn_terminus_filter (terminus);
/* Map creation with selector*/
std::string selector = "jms-selector";
pn_data_put_symbol(data, pn_bytes(selector.size(), selector.c_str()));
// Described
std::string filter = "JMSCorrelationID='12346789'";
pn_data_put_string(data, pn_bytes(6, "string"));
pn_data_put_string(data, pn_bytes(filter.size(), filter.c_str()));


pn_messenger_recv(msgConsumer, -1);
if (pn_messenger_incoming(msgConsumer))
    // The message is arrived
    pn_message_t* message = pn_message();
    pn_messenger_get(msgConsumer, message);

And unfortunately, I have a time out, the message is on the queue, and like
before (if I do pn_messenger_start  before pn_messenger_recv and
pn_messenger_stop after, it's works!!!

Your help is very important, I believe, I am not very far, but.....

So what do you thinks Dominic???

Thanks a lot

View this message in context: 
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.

Reply via email to