[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zeromq-dev
Subject:    Re: [zeromq-dev] Asyncronous clients
From:       Harald Achitz <harald.achitz () gmail ! com>
Date:       2017-05-07 6:05:03
Message-ID: CAPh+tzPggnfy2Z2_9+_m0bQq1vx3+tnAc-sXVKK_vw_7ZoqMRQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


if messages can come out of order but orders matter for you than add a
message id at the end, or between the address package and the message
package of the multi part message

2017-04-24 22:31 GMT+02:00 =D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 =D0=9E=D0=
=BB=D0=B5=D0=B9=D0=BD=D0=B8=D0=BA <andrey.oleynik@me.com>:

> Justin,
>
> Identity determine socket. In my case it is DEALER socket which connects
> to ROUTER sockets with the same identity.
> DEALER wouldn't receive messages unless identity set correctly. So I
> think, I'm using correct address.
>
> The problem is that I don't know how to match request with response on th=
e
> same socket in case when order of responses is not defined.
>
> Andrey
>
> =D0=BF=D0=BD, 24 =D0=B0=D0=BF=D1=80. 2017 =D0=B3. =D0=B2 21:54, Justin Ka=
rneges <justin@karneges.com>:
>
>> Hi Andrey,
>>
>> ROUTER sockets read the first part of the message as the recipient
>> address. Is it possible you're using the wrong address when sending?
>>
>> Justin
>>
>> On Mon, Apr 24, 2017, at 01:08 AM, =D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9 =
=D0=9E=D0=BB=D0=B5=D0=B9=D0=BD=D0=B8=D0=BA wrote:
>>
>> Hello,
>>
>> I have a chat application that receives messages through WebSockets and
>> processes them on workers connected by a DEALER-ROUTER pattern. Chat sen=
ds
>> and receives ZMQ messages through one DEALER socket. It has been working
>> until I added second worker (ROUTER socket). From now there is not guara=
nty
>> that client will receive its own response.
>>
>> As I understand the solution could be to use separate DEALER socket for
>> each WebSocket connection or use one socket with a wrapper that will han=
dle
>> sharing across WebSockets connections.
>>
>> What is the best way to have it done?
>>
>> Thank you,
>> Andrey
>>
>> *_______________________________________________*
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>

[Attachment #5 (text/html)]

<div dir="ltr">if messages can come out of order but orders matter for you than add a \
message id at the end, or between the address package and the message package of the \
multi part message<br></div><div class="gmail_extra"><br><div \
class="gmail_quote">2017-04-24 22:31 GMT+02:00 Андрей Олейник <span \
dir="ltr">&lt;<a href="mailto:andrey.oleynik@me.com" \
target="_blank">andrey.oleynik@me.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div>Justin,</div><div><br></div><div>Identity \
determine socket. In my case it is DEALER socket which connects to ROUTER sockets \
with the same identity.</div><div>DEALER wouldn&#39;t receive messages unless \
identity set correctly. So I think, I&#39;m using correct \
address.</div><div><br></div><div>The problem is that I don&#39;t know how to match \
request with response on the same socket in case when order of responses is not \
defined.</div><div><br></div><div>Andrey</div></div><br><div class="gmail_quote"><div \
dir="ltr">пн, 24 апр. 2017 г. в 21:54, Justin Karneges &lt;<a \
href="mailto:justin@karneges.com" \
target="_blank">justin@karneges.com</a>&gt;:<br></div><div><div \
class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><u></u>




<div><div>Hi Andrey,<br></div>
<div><br></div>
<div>ROUTER sockets read the first part of the message as the recipient address. Is \
it possible you&#39;re using the wrong address when sending?<br></div> \
<div><br></div> <div>Justin<br></div></div><div>
<div><br></div>
<div>On Mon, Apr 24, 2017, at 01:08 AM, Андрей Олейник wrote:<br></div>
</div><div><blockquote type="cite"><div dir="ltr"><div>Hello,<br></div>
<div><br></div>
<div>I have a chat application that receives messages through WebSockets and \
processes them on workers connected by a DEALER-ROUTER pattern. Chat sends and \
receives ZMQ messages through one DEALER socket. It has been working until I added \
second worker (ROUTER socket). From now there is not guaranty that client will \
receive its own response.<br></div> <div><br></div>
<div>As I understand the solution could be to use separate DEALER socket for each \
WebSocket connection or use one socket with a wrapper that will handle sharing across \
WebSockets connections.<br></div> <div><br></div>
<div>What is the best way to have it done?<br></div>
<div><br></div>
<div>Thank you,<br></div>
<div>Andrey<br></div>
</div>
</blockquote></div><div><blockquote \
type="cite"><div><u>______________________________<wbr>_________________</u><br></div>
 <div>zeromq-dev mailing list<br></div>
<div><a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br></div> <div><a \
href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" \
target="_blank">https://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></div>
 </blockquote><div><br></div>
</div>

______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org" \
target="_blank">zeromq-dev@lists.zeromq.org</a><br> <a \
href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">https://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a></blockquote></div></div></div>
 <br>______________________________<wbr>_________________<br>
zeromq-dev mailing list<br>
<a href="mailto:zeromq-dev@lists.zeromq.org">zeromq-dev@lists.zeromq.org</a><br>
<a href="https://lists.zeromq.org/mailman/listinfo/zeromq-dev" rel="noreferrer" \
target="_blank">https://lists.zeromq.org/<wbr>mailman/listinfo/zeromq-dev</a><br></blockquote></div><br></div>



[Attachment #6 (text/plain)]

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic