Release 0.9

2015-01-16 Thread xavier
Hi all,

Do you know when the qpid-proon 0.9 lib would be release? The initial plan
was be at the end of the year (2014), just to know!

Regards



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Release-0-9-tp7618431.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Filtering message bugged?

2014-12-26 Thread xavier
Hi all,

Scenario:
Creation a filter to recieve any message containing the filter.
pn_link_t* link = pn_messenger_get_link(msgConsumer, (myQueue, false);
pn_messenger_subscribe(msgConsumer, (myQueue);
link = pn_messenger_get_link(msgConsumer, myQueue, false);
pn_link_open(link);
// We create the filter
createFilter(link, token);
pn_messenger_recv(msgConsumer, -1);
if (pn_messenger_incoming(msgConsumer))
{
   
   
}
pn_link_close(link);

For any reason if the message correlated with the filter does not arrive
(the responder is out) the message is kept by the broker (the functionality
is respected).
Nor the responder coming again. We post a another question, and wait the
answer (with a different filter (correlationId is different)) we re do the
code above.
We have the answer but not with the good filter (correlation Id is the
previous)
The work around is:
pn_messenger_stop (msgConsumer);
and 
pn_messenger_start (msgConsumer);

For me it's a bug, isn't it?

Regards





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Filtering-message-bugged-tp7617931.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


RE: CorrelationId

2014-12-18 Thread xavier
No, because I am on windows side, but for me the pb is

msgConsumer is done ONE time
and I call this function more one time, and each time, the memory grow up 
???

pn_link_t* link;
pn_messenger_subscribe(msgConsumer, "amqp://127.0.0.1:5672/queue://myqueue");
link = pn_messenger_get_link(msgConsumer, 
("amqp://127.0.0.1:5672/queue://myqueue").c_str(), false);
pn_link_open(link);

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_map(data);
pn_data_enter(data);;
pn_data_put_symbol(data, pn_bytes(selector.size(), selector.c_str()));
// Described of the JMS_SELECTOR line 1262
std::string filter = "JMSCorrelationID='12346789'";
pn_data_put_described(data);
pn_data_enter(data);
pn_data_put_string(data, pn_bytes(6, "string"));
pn_data_put_string(data, pn_bytes(filter.size(), filter.c_str()));
pn_data_exit(data);

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);
  .
  .
  pn_message_free(message);
}
pn_link_close(link);


From: Dominic Evans [via Qpid] 
[mailto:ml-node+s2158936n7617738...@n2.nabble.com]
Sent: jeudi 18 décembre 2014 17:44
To: Millieret, Xavier
Subject: RE: CorrelationId

xavier wrote
Perhaps I must free some object, but in debug mode and checking the memory, 
memory grow up, each time I do pn_messenger_subscribe, pn_messenger_recv, etc.
did you try running your binary via valgrind memcheck?


If you reply to this email, your message will be added to the discussion below:
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617738.html
To unsubscribe from CorrelationId, click 
here<http://qpid.2158936.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7614606&code=eGF2aWVybWlsbGllcmV0QGVhdG9uLmNvbXw3NjE0NjA2fDIzNDEwNTMzMA==>.
NAML<http://qpid.2158936.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




Eaton Industries (France) S.A.S ~ Siège social: 110 Rue Blaise Pascal, Immeuble 
Le Viséo - Bâtiment A Innovallée, 38330, Montbonnot-St.-Martin, France ~ Lieu 
d'enregistrement au registre du commerce: Grenoble ~ Numéro d'enregistrement: 
509 653 176 ~ Capital social souscrit et liberé:EUR 16215441 ~ Numéro de TVA: 
FR47509653176








--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617739.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.

amqp:unauthorized-access

2014-12-18 Thread xavier
Hi all,

how can we have this return error in messenger.
The pn_messenger_recv(messenger, -1); function return only PN_STATE_ERR (-5)
or any other function to try a connection with the broker?

Thanks for your help



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/amqp-unauthorized-access-tp7617737.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


RE: CorrelationId

2014-12-15 Thread xavier
Hi,

Any body have an idea about this? The new version of the lib will fix this,
or it's my code?

regards



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617531.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: Next realease of qpid-proton

2014-12-11 Thread xavier
Thank you Rafael



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Next-realease-of-qpid-proton-tp7617393p7617395.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Next realease of qpid-proton

2014-12-11 Thread xavier
Hi all,

Do you where can I find the roadmap for qpid-proton library?

Regards



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Next-realease-of-qpid-proton-tp7617393.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


RE: CorrelationId

2014-12-10 Thread xavier
Dominic,

I posted my code for the community.
But I progress, and all works, but I saw, with this code, the memory grow up in 
each time, I did this function:

pn_link_t* link;
pn_messenger_subscribe(msgConsumer, "amqp://127.0.0.1:5672/queue://myqueue");
link = pn_messenger_get_link(msgConsumer, 
("amqp://127.0.0.1:5672/queue://myqueue").c_str(), false);
pn_link_open(link);

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_map(data);
pn_data_enter(data);;
pn_data_put_symbol(data, pn_bytes(selector.size(), selector.c_str()));
// Described of the JMS_SELECTOR line 1262
std::string filter = "JMSCorrelationID='12346789'";
pn_data_put_described(data);
pn_data_enter(data);
pn_data_put_string(data, pn_bytes(6, "string"));
pn_data_put_string(data, pn_bytes(filter.size(), filter.c_str()));
pn_data_exit(data);

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);
  .
  .
  pn_message_free(message);
}
pn_link_close(link);


The goal is simple, why I implemented this, because I implemented the pattern 
request/reply, and the reply is in function of the correlationid (setted in the 
 request), so in my application I have the msgConsumer builds one time, and I 
reuse it each time, that I wait the reply.
Perhaps I must free some object, but in debug mode and checking the memory, 
memory grow up, each time I do pn_messenger_subscribe, pn_messenger_recv, etc.


Cheers

From: Dominic Evans [via Qpid] 
[mailto:ml-node+s2158936n7617327...@n2.nabble.com]
Sent: mercredi 10 décembre 2014 12:07
To: Millieret, Xavier
Subject: Re: CorrelationId

Hi Xavier, so 006FE360 is your messenger that is responsible for subscribing 
and receiving the messages based upon the selector.
xavier wrote
[006FE360]:  -> SASL
[006FE360]:0 -> @sasl-init(65) [mechanism=:PLAIN, 
initial-response=b"\x00emc2\x00emc2"]
[006FE360]:  <- SASL
[006FE360]:0 <- @sasl-mechanisms(64) 
[sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
[006FE360]:0 <- @sasl-outcome(68) [code=0]
[006FE360]:  -> AMQP
[006FE360]:0 -> @open(16) [container-id="6aae955e-cd32-488a-8119-67ec0b715924", 
hostname="localhost"]
[006FE360]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, 
outgoing-window=0]
[006FE360]:0 -> @attach(18) [name="queue://emc2-ea2a65", handle=0, role=true, 
snd-settle-mode=1, rcv-settle-mode=0, source=@source(40) [address="queue
://emc2-ea2a65", durable=0, timeout=0, dynamic=false, 
filter={:"jms-selector"=@"string" 
"JMSCorrelationID='28a8d7e8-bb82-e41e-1236-5c9f77a057c7'"}], t
arget=@target(41) [address="queue://emc2-ea2a65", durable=0, timeout=0, 
dynamic=false], initial-delivery-count=0]
[006FE360]:0 -> @flow(19) [incoming-window=2147483647, next-outgoing-id=0, 
outgoing-window=0, handle=0, delivery-count=0, link-credit=1024, drain=fals
e]
[006FE360]:  <- AMQP
[006FE360]:0 <- @open(16) [container-id="", hostname="", 
max-frame-size=4294967295, channel-max=32767, 
properties={:"x-opt-anonymous-relay"="$relay"}]

[006FE360]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1, 
incoming-window=0, outgoing-window=0, handle-max=1024]
[006FE360]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, 
next-outgoing-id=1, outgoing-window=0]
[006FE360]:0 <- @attach(18) [name="queue://emc2-ea2a65", handle=0, role=false, 
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="queu
e://emc2-ea2a65", durable=0, expiry-policy=:"session-end", timeout=0, 
dynamic=false, filter={:"jms-selector"=@"string" "JMSCorrelationID='28a8d7e8-bb8
2-e41e-1236-5c9f77a057c7'"}], target=@target(41) 
[address="queue://emc2-ea2a65"], incomplete-unsettled=false, 
initial-delivery-count=0]
[006FE360]:0 <- @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"", 
message-format=0, settled=true] (407) "\x00Sp\xc0\x04\x02BP\x04\x00Sr\xc1\x1
7\x02\xa3\x0dx-opt-to-type\xa1\x05queue\x00Ss\xc0\x7f\x0a\xa12ID:GREFRWHP1006921-61781-1418144200447-1:1:383:1:1@\xa1\x13queue://emc2-ea2a65@@\xa1$28a
8d7e8-bb82-e41e-1236-5c9f77a057c7@@@\x83\x00\x00\x01J3\xc9\xc9\x12\x00Sw\xa1\xe9{"header":{"manufacturer":"com.eaton.pqsoft","uuid":"c1b3e315-a5e4-47b
4-8128-51b0bf6284b7","timeStamp":1418208069,"providerId":"emc4j","flowType":"reply","destination":"TestSimpleBus.add","contentType":"java.lang.Integer
"

RE: CorrelationId

2014-12-10 Thread xavier
Here the right code
//Doing this one 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);

// Doing this more time
pn_link_t* link;
pn_messenger_subscribe(msgConsumer,
"amqp://127.0.0.1:5672/queue://myqueue");
link = pn_messenger_get_link(msgConsumer,
("amqp://127.0.0.1:5672/queue://myqueue").c_str(), false);
pn_link_open(link);

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_map(data);
pn_data_enter(data);;
pn_data_put_symbol(data, pn_bytes(selector.size(), selector.c_str()));
// Described of the JMS_SELECTOR line 1262
std::string filter = "JMSCorrelationID='12346789'";
pn_data_put_described(data);
pn_data_enter(data);
pn_data_put_string(data, pn_bytes(6, "string"));
pn_data_put_string(data, pn_bytes(filter.size(), filter.c_str()));
pn_data_exit(data);

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);
  .
  .
  pn_message_free(message);
}
pn_link_close(link);



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617333.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


RE: CorrelationId

2014-12-10 Thread xavier
Right!!!
I changed the order of my close and open, and it's works. Thanks a lot, I will 
do any test this afternoon, and post on the thread the final code.

So thanks a lot for your help, perhaps document the PN_TRACE_FRM=1 because it's 
very helpful.

A another time. Thanks a lot

From: Dominic Evans [via Qpid] 
[mailto:ml-node+s2158936n7617327...@n2.nabble.com]
Sent: mercredi 10 décembre 2014 12:07
To: Millieret, Xavier
Subject: Re: CorrelationId

Hi Xavier, so 006FE360 is your messenger that is responsible for subscribing 
and receiving the messages based upon the selector.
xavier wrote
[006FE360]:  -> SASL
[006FE360]:0 -> @sasl-init(65) [mechanism=:PLAIN, 
initial-response=b"\x00emc2\x00emc2"]
[006FE360]:  <- SASL
[006FE360]:0 <- @sasl-mechanisms(64) 
[sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
[006FE360]:0 <- @sasl-outcome(68) [code=0]
[006FE360]:  -> AMQP
[006FE360]:0 -> @open(16) [container-id="6aae955e-cd32-488a-8119-67ec0b715924", 
hostname="localhost"]
[006FE360]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, 
outgoing-window=0]
[006FE360]:0 -> @attach(18) [name="queue://emc2-ea2a65", handle=0, role=true, 
snd-settle-mode=1, rcv-settle-mode=0, source=@source(40) [address="queue
://emc2-ea2a65", durable=0, timeout=0, dynamic=false, 
filter={:"jms-selector"=@"string" 
"JMSCorrelationID='28a8d7e8-bb82-e41e-1236-5c9f77a057c7'"}], t
arget=@target(41) [address="queue://emc2-ea2a65", durable=0, timeout=0, 
dynamic=false], initial-delivery-count=0]
[006FE360]:0 -> @flow(19) [incoming-window=2147483647, next-outgoing-id=0, 
outgoing-window=0, handle=0, delivery-count=0, link-credit=1024, drain=fals
e]
[006FE360]:  <- AMQP
[006FE360]:0 <- @open(16) [container-id="", hostname="", 
max-frame-size=4294967295, channel-max=32767, 
properties={:"x-opt-anonymous-relay"="$relay"}]

[006FE360]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1, 
incoming-window=0, outgoing-window=0, handle-max=1024]
[006FE360]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647, 
next-outgoing-id=1, outgoing-window=0]
[006FE360]:0 <- @attach(18) [name="queue://emc2-ea2a65", handle=0, role=false, 
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="queu
e://emc2-ea2a65", durable=0, expiry-policy=:"session-end", timeout=0, 
dynamic=false, filter={:"jms-selector"=@"string" "JMSCorrelationID='28a8d7e8-bb8
2-e41e-1236-5c9f77a057c7'"}], target=@target(41) 
[address="queue://emc2-ea2a65"], incomplete-unsettled=false, 
initial-delivery-count=0]
[006FE360]:0 <- @transfer(20) [handle=0, delivery-id=0, delivery-tag=b"", 
message-format=0, settled=true] (407) "\x00Sp\xc0\x04\x02BP\x04\x00Sr\xc1\x1
7\x02\xa3\x0dx-opt-to-type\xa1\x05queue\x00Ss\xc0\x7f\x0a\xa12ID:GREFRWHP1006921-61781-1418144200447-1:1:383:1:1@\xa1\x13queue://emc2-ea2a65@@\xa1$28a
8d7e8-bb82-e41e-1236-5c9f77a057c7@@@\x83\x00\x00\x01J3\xc9\xc9\x12\x00Sw\xa1\xe9{"header":{"manufacturer":"com.eaton.pqsoft","uuid":"c1b3e315-a5e4-47b
4-8128-51b0bf6284b7","timeStamp":1418208069,"providerId":"emc4j","flowType":"reply","destination":"TestSimpleBus.add","contentType":"java.lang.Integer
"},"body":18}"
We can see it connect, make the @attach, receive an ACK to that @attach, and 
then receive its first message via the @transfer. However, after that we no 
longer see that messenger doing anything? Based upon the earlier discussions, 
I'd have expected to see an @close for the pn_link_{close,detach} and then a 
fresh @attach for a link with the new correlation id selector.

If you reply to this email, your message will be added to the discussion below:
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617327.html
To unsubscribe from CorrelationId, click 
here<http://qpid.2158936.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7614606&code=eGF2aWVybWlsbGllcmV0QGVhdG9uLmNvbXw3NjE0NjA2fDIzNDEwNTMzMA==>.
NAML<http://qpid.2158936.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notif

Re: CorrelationId

2014-12-10 Thread xavier
Hi Dominic,

I set PN_TRACE_FRM=1  and here my trace.


[006FC110]:  -> SASL
[006FC110]:0 -> @sasl-init(65) [mechanism=:PLAIN,
initial-response=b"\x00emc2\x00emc2"]
[006FC110]:  <- SASL
[006FC110]:0 <- @sasl-mechanisms(64)
[sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
[006FC110]:0 <- @sasl-outcome(68) [code=0]
[006FC110]:  -> AMQP
[006FC110]:0 -> @open(16)
[container-id="a74c872a-e7df-46a8-9ebd-48c933eabf6f", hostname="localhost"]
[006FC110]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=0]
[006FC110]:0 -> @attach(18) [name="queue://emc2-connexion", handle=0,
role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="qu
eue://emc2-connexion", durable=0, timeout=0, dynamic=false],
target=@target(41) [address="queue://emc2-connexion", durable=0, timeout=0,
dynamic=false
], initial-delivery-count=0]
[006FC110]:0 -> @flow(19) [incoming-window=2147483647, next-outgoing-id=0,
outgoing-window=0, handle=0, delivery-count=0, link-credit=1024, drain=fals
e]
[006FC110]:  <- AMQP
[006FC110]:0 <- @open(16) [container-id="", hostname="",
max-frame-size=4294967295, channel-max=32767,
properties={:"x-opt-anonymous-relay"="$relay"}]

[006FC110]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1,
incoming-window=0, outgoing-window=0, handle-max=1024]
[006FC110]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647,
next-outgoing-id=1, outgoing-window=0]
[006FC110]:0 <- @attach(18) [name="queue://emc2-connexion", handle=0,
role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="q
ueue://emc2-connexion"], target=@target(41)
[address="queue://emc2-connexion"], incomplete-unsettled=false,
initial-delivery-count=0]
[006FC110]:0 -> @detach(22) [handle=0, closed=true]
[006FC110]:0 -> @close(24) []
[006FC110]:  -> EOS
[006FC110]:  -> EOS
[006FC110]:  -> EOS
[006FC110]:0 <- @detach(22) [handle=0, closed=true]
[006FC110]:  -> EOS
[006FC110]:  -> EOS
[006FC110]:  -> EOS
[006FC110]:0 <- @close(24) []
[006FC110]:  <- EOS
[006FC110]:  -> EOS
[006FC110]:  -> EOS
[006FC110]:  -> EOS
[006FC110]:  -> EOS

[02B82D30]:  -> SASL
[02B82D30]:0 -> @sasl-init(65) [mechanism=:PLAIN,
initial-response=b"\x00emc2\x00emc2"]
[02B82D30]:  <- SASL
[02B82D30]:0 <- @sasl-mechanisms(64)
[sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
[02B82D30]:0 <- @sasl-outcome(68) [code=0]
[02B82D30]:  -> AMQP
[02B82D30]:0 -> @open(16)
[container-id="da1205e2-c0d8-4a71-ac6e-903aa6797788", hostname="localhost"]
[02B82D30]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=1]
[02B82D30]:0 -> @attach(18) [name="sender-xxx", handle=0, role=false,
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="queue://TestS
impleBus", durable=0, timeout=0, dynamic=false], target=@target(41)
[address="queue://TestSimpleBus", durable=0, timeout=0, dynamic=false],
initial-de
livery-count=0]
[02B82D30]:  <- AMQP
[02B82D30]:0 <- @open(16) [container-id="", hostname="",
max-frame-size=4294967295, channel-max=32767,
properties={:"x-opt-anonymous-relay"="$relay"}]

[02B82D30]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=1,
incoming-window=0, outgoing-window=0, handle-max=1024]
[02B82D30]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647,
next-outgoing-id=1, outgoing-window=0]
[02B82D30]:0 <- @attach(18) [name="sender-xxx", handle=0, role=true,
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
[address="queue://TestSi
mpleBus"], target=@target(41) [address="queue://TestSimpleBus"]]
[02B82D30]:0 <- @flow(19) [next-incoming-id=0, incoming-window=2147483647,
next-outgoing-id=1, outgoing-window=0, handle=0, delivery-count=0, link-cre
dit=100]
[02B82D30]:0 -> @transfer(20) [handle=0, delivery-id=0,
delivery-tag=b"\x00\x00\x00\x00\x00\x00\x00\x00", message-format=0,
settled=true, more=false]
(405)
"\x00Sp\xd0\x00\x00\x00\x0b\x00\x00\x00\x05BP\x04@BR\x00\x00Ss\xd0\x00\x00\x00\x86\x00\x00\x00\x0d@@\xa1+amqp://localhost:5672/queue://TestSimpl
eBus@\xa1\x0bemc2-ea2a65\xa1$28a8d7e8-bb82-e41e-1236-5c9f77a057c7\xa3\x06string@\x83\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x00\x00\x00\x00\x
00@R\x00@\x00Sw\xa1\xef{"header":{"manufacturer":"com.eaton.pqsoft","uuid":"c6e83b5c-cfdb-0f9d-a8c7-c49eb24980e8","timeStamp":1418208069.848,"provider
Id":"emc2-ea2a65","flowType":"request","destination":"TestSimpleBus.add","bodyType":null},"body":{"a":10,"b":8}}"
[006FE360]:  -> SASL
[006FE360]:0 -> @sasl-init(65) [mechanism=:PLAIN,
initial-response=b"\x00emc2\x00emc2"]
[006FE360]:  <- SASL
[006FE360]:0 <- @sasl-mechanisms(64)
[sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS, :PLAIN]]
[006FE360]:0 <- @sasl-outcome(68) [code=0]
[006FE360]:  -> AMQP
[006FE360]:0 -> @open(16)
[container-id="6aae955e-cd32-488a-8119-67ec0b715924", hostname="localhost"]
[006FE360]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647,
outgoing-window=0]
[006FE360]:0 -> @attach(18) [name="queue://emc2-ea2a65", handle=0,
role=true, snd-settle-mode=1, rcv-settle-m

Re: CorrelationId

2014-12-09 Thread xavier
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_messenger_subscribe(msgConsumer,
"amqp://127.0.0.1:5672/queue://myqueue");
pn_link_t* link = pn_messenger_get_link(msgConsumer,
("amqp://127.0.0.1:5672/queue://myqueue").c_str(), false);

*pn_link_detach(link);*

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_map(data);
pn_data_enter(data);
pn_data_put_symbol(data, pn_bytes(selector.size(), selector.c_str()));
// Described
std::string filter = "JMSCorrelationID='12346789'";
pn_data_put_described(data);
pn_data_enter(data);
pn_data_put_string(data, pn_bytes(6, "string"));
pn_data_put_string(data, pn_bytes(filter.size(), filter.c_str()));
pn_data_exit(data);

*pn_link_open(link);*

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);
.
.
pn_message_free(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: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617311.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: CorrelationId

2014-12-05 Thread xavier
Hi all,

I found the solution (for ActiveMq, with a connector in AMQP, and a
connector with openwire), so I share the solution.
I used the idea of Dominic Evans, so If I want to get a message from a
filter (for example correlationId ), I did this:

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);

pn_messenger_subscribe(msgConsumer,
"amqp://127.0.0.1:5672/queue://myqueue");
pn_link_t* link = pn_messenger_get_link(msgConsumer,
("amqp://127.0.0.1:5672/queue://myqueue").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_map(data);
pn_data_enter(data);;
pn_data_put_symbol(data, pn_bytes(selector.size(), selector.c_str()));
// Described of the JMS_SELECTOR line 1262
std::string filter = "JMSCorrelationID='12346789'";
pn_data_put_described(data);
pn_data_enter(data);
pn_data_put_string(data, pn_bytes(6, "string"));
pn_data_put_string(data, pn_bytes(filter.size(), filter.c_str()));
pn_data_exit(data);

pn_messenger_start (msgConsumer);
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);
  .
  .
  pn_message_free(message);
}

...

It's works, so thanks to Dominic Evans to give me the begining way.

enjoy











 



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7617208.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: CorrelationId

2014-11-12 Thread xavier
Hi all,

I re start to work on this issue!!! and it is not work!

So here my last code:

// get recv link
pn_link_t* link = pn_messenger_get_link (messengerConsumer, myAdress,
false);
// get the source link, is't it, I saw, before doing that on the the
activemq's log, than the filter is: the
source=Source{address='queue://myQueue', durable=NONE,  filter=null,
pn_terminus_t* terminus = pn_link_source(link);
// Get the terminus
pn_data_t* data = pn_terminus_filter (terminus);
// I would like to put a map with jms-selector key (or selector-filter) like
the explanation:
//
https://svn.apache.org/repos/asf/qpid/trunk/qpid/specs/apache-filters.xml#type-selector-filter
// but I don't know to do that I have just this pn_data_put_map(pn_data_t
*data), and how to inset somethings  so I try with symbol
pn_data_put_symbol(data, pn_bytes(strlen("color='blue'"), "color='blue'"));
pn_link_close(link);

and on my activeMq I have the following error:
AmqpProtocolException: Could not decode AMQP frame

The goal is to put mycorrelation id on this filter, of course!

Any help will be appreciated, because, in this moment i am lost with this
library!!
Thanks





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7616320.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: CorrelationId

2014-10-09 Thread xavier
Hi all,

pn_messenger_get_link is not in the 0.7 qpid lib, right?
Is it in the next release 0.8 ? If yes do you have any date for it, and code
sample, with?

Thanks a lot 

regards 



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7614826.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: CorrelationId

2014-10-08 Thread xavier
Hi all,

Thanks a lot for your answer, I am busy today, but I will try this, and send
you me feedback.

Regards



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7614825.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: CorrelationId

2014-10-08 Thread xavier
Hi Frase,

Thanks for your explanation, but here, my code:

In the requester:

char * corrId;
.
.
pn_bytes_t bytes  = pn_bytes(correlationId.size(), corrId);
pn_atom_t id;
id.type = PN_STRING;
id.u.as_bytes = bytes;
pn_message_set_correlation_id(message, id);

and after, send it
pn_messenger_put(messengerProducer, message);

I see on the broker, the correlationId is correctly setted, so no pb.

after I wait the answer, but I would like (like JMS) only wake up on an
answer at my question (and the correlationId is here to do that)

in CMS

MessageConsumer* consumer = session->createConsumer(destination,
"JMSCorrelationID='" + correlationId + "'");
consumer->start();

But with qpid proton and messenger, if I do that:
I get the response, and I does not accept it, if the correlationId recieve,
is not the good one, but for me, it's not a good practice, because we
retrieve the message (network traffic) in right case, but in wrong case too. 

So I would like to the same things like CMS, but how

pn_selectable_t ??
pn_selector_t 

Thank you

Xav




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7614771.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


Re: CorrelationId

2014-10-07 Thread xavier
Hi all,

Thanks you for your reply, help?
So if I understand properly, to do that with messenger is not trivial??? But
I don't understand why, because with the pattern request/reply in
asynchronous mode, and with dedicated queue, we must have this feature.
isn't it? So to do that must I take some temporally queue? or using selector
(in messenger), but I don't know (with the documentation), how it's works?
is there any sample?

Thanks a lot for your help

Regards



--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606p7614740.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.


CorrelationId

2014-10-02 Thread xavier
Hi all,
I am new with Qpid Proton  So I try to using it with ActiveMq, and
migrate my old code based on CMS (JMS for C) ! I would like to get a message
filtered on correlationId, like with CMS:

session->createConsumer(destination, "JMSCorrelationID='" + correlationId +
"'")

But with Qpid proton (proton/messenger.h) how can I do that???

Any help will be appreciate

Regards




--
View this message in context: 
http://qpid.2158936.n2.nabble.com/CorrelationId-tp7614606.html
Sent from the Apache Qpid Proton mailing list archive at Nabble.com.