Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 263EE200B5E for ; Wed, 10 Aug 2016 18:20:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 24C55160AA4; Wed, 10 Aug 2016 16:20:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6ABD0160A8F for ; Wed, 10 Aug 2016 18:20:51 +0200 (CEST) Received: (qmail 22947 invoked by uid 500); 10 Aug 2016 16:20:50 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 22935 invoked by uid 99); 10 Aug 2016 16:20:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Aug 2016 16:20:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id DB870C0455 for ; Wed, 10 Aug 2016 16:20:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.243 X-Spam-Level: X-Spam-Status: No, score=0.243 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, REPTO_QUOTE_YAHOO=0.49, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id zTMcz5wDVsqk for ; Wed, 10 Aug 2016 16:20:48 +0000 (UTC) Received: from nm15.bullet.mail.bf1.yahoo.com (nm15.bullet.mail.bf1.yahoo.com [98.139.212.174]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 58FFF5FE18 for ; Wed, 10 Aug 2016 16:20:47 +0000 (UTC) Received: from [98.139.170.180] by nm15.bullet.mail.bf1.yahoo.com with NNFMP; 10 Aug 2016 16:20:40 -0000 Received: from [98.139.212.195] by tm23.bullet.mail.bf1.yahoo.com with NNFMP; 10 Aug 2016 16:20:40 -0000 Received: from [127.0.0.1] by omp1004.mail.bf1.yahoo.com with NNFMP; 10 Aug 2016 16:20:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 371130.75229.bm@omp1004.mail.bf1.yahoo.com Received: from jws10676.mail.bf1.yahoo.com by sendmailws167.mail.bf1.yahoo.com; Wed, 10 Aug 2016 16:19:00 +0000; 1470845940.253 Date: Wed, 10 Aug 2016 16:18:59 +0000 (UTC) From: Deb Haldar Reply-To: "debohaldar@yahoo.com" To: Andrew Stitcher , "users@qpid.apache.org" Message-ID: <1859268273.14311049.1470845939290.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: <1470845080.2906.93.camel@redhat.com> References: <1817485770.7079054.1470784682753.JavaMail.yahoo.ref@mail.yahoo.com> <1817485770.7079054.1470784682753.JavaMail.yahoo@mail.yahoo.com> <1364317864.14730604.1470844437718.JavaMail.yahoo@mail.yahoo.com> <1470845080.2906.93.camel@redhat.com> Subject: Re: Using two AMQP Links over the same socket MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14311048_1394238849.1470845939286" archived-at: Wed, 10 Aug 2016 16:20:52 -0000 ------=_Part_14311048_1394238849.1470845939286 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hey Andrew, Yes, we're using c++ around this code. However, we have customized the io l= ayer to use websockets instead of TCP sockets. There are also platform spec= ific changes which will make it hard to migrate to the c++ API. Here is our scenario - we need to create two amqp topics on the same websoc= ket\tcpsocket endpoint.=C2=A0 Instead of trying to set a different message address on same messenger inst= ance , is it more preferable to use two instances of messengers - each one = targeting a different message address?=C2=A0 Just wondering how you guys would tackle this scenario in general where you= need to create two amqp links on same endpoint using the C proton API. Thanks a lot,Deb. Sent from Yahoo Mail on Android=20 =20 On Wed, Aug 10, 2016 at 9:04 AM, Andrew Stitcher wr= ote: On Wed, 2016-08-10 at 15:53 +0000, Deb Haldar wrote: > Guys, any thoughts on the question below? I suspect the delay in replying is that no one here is 100% sure whether you can change the message address and expect messenger to automatically re-establich a new link, without checking the source code. That is compounded by the most of the current development work going into reactive style APIs. I can tell you are using C++ around this code - is it possible for you to code this using the reactive C++ API from 0.13 or the beta 0.14? It would require a little different framework code, but that is an API that we are currently working on actively. Andrew > Thanks,Deb. >=20 > Sent from Yahoo Mail on Android=C2=A0 > =C2=A0 > =C2=A0 On Tue, Aug 9, 2016 at 4:18 PM, Deb Haldar ALID> wrote:=C2=A0=C2=A0=C2=A0Hi Folks, > I'm trying to use the C Proton messenger to establish and send data > over two AMQP links. While the first link gets established, I don't > see the second link getting established. > My code looks like the following below: > bool SendMessage(const char* msgtext, size_t message_size, > std::string tenantRoute) > { > =C2=A0 > =C2=A0pn_message_t* message =3D pn_message(); > =C2=A0pn_message_clear(message); > =C2=A0pn_message_set_address(message, tenantRoute.c_str()); > =C2=A0pn_data_t* body =3D pn_message_body(message);=C2=A0pn_data_put_bina= ry(body, > pn_bytes(message_size, > msgtext));=C2=A0pn_message_set_content_type(message,"charset=3Dutf-8"); > =C2=A0pn_message_set_subject(message, "AMQPTest"); > =C2=A0 > =C2=A0//set the timeout of the messenger=C2=A0 > =C2=A0pn_messenger_set_timeout(messenger, AmqpMessengerTimeout); // wait > for a max of two seconds before exit=C2=A0pn_messenger_put(messenger, > message);=C2=A0int result =3D pn_messenger_send(messenger, -1);=C2=A0pn_s= tatus_t > status =3D pn_messenger_status(messenger, tracker); > =C2=A0 > =C2=A0if (status =3D=3D PN_STATUS_ACCEPTED && !(result < 0)) > =C2=A0{ > =C2=A0=C2=A0sendResult =3D true; > =C2=A0} > =C2=A0else > =C2=A0{ > =C2=A0=C2=A0sendResult =3D false; > =C2=A0}=C2=A0pn_message_free(message); > =C2=A0message =3D NULL;=C2=A0return sendResult; > } > Essentially I'm trying to pass a new AMQP link address via > tenantroute every time I call this function.Any ideas ? > Thanks, > Deb.=C2=A0=C2=A0 =20 ------=_Part_14311048_1394238849.1470845939286--