[zeromq-dev] rcvd msg does not match sent msg

Dominic Tarr dominic.tarr at gmail.com
Mon Dec 26 21:48:27 CET 2011


can you gist the code?

it's hard to help if you we can't see your code.

I think the main thread should be REPLY, and the worker should be REQUEST,
is that how you have it?

On Tue, Dec 27, 2011 at 9:29 AM, Ashok Chippa <a.n.chippa at gmail.com> wrote:

> Hi,
>
> I am trying to send a small msg from a thread to its main process using
> inproc. I have tried
> several types: REP-REQ, XREP-XREQ, ROUTER-DEALER, PUB-SUB, etc. without
> success.
> Here's what I get when using REP-REQ:
> achippa at ubuntu:~/projects/groupchat$ ./client 10.1.1.1 1111
> client started with ipaddress 10.1.1.1 port 1111
> connected to user socket
> C foo
> test_create_group: packed size = 21
> 0*8*00*1*000 18002000 28003203 666f6f38
> 0040004a 00
> main: rcvd msg size = 21
> 0*0*00*0*000 18002000 28003203 666f6f38
> 0040004a 00
> gc_client_handle_message
> message 'group_chat_msg': missing required field 'direction'
> Segmentation fault
>
> When I replace REP-REQ with XREP-XREQ I get this:
>
> achippa at ubuntu:~/projects/groupchat$ ./client 10.1.1.1 1111
> client started with ipaddress 10.1.1.1 port 1111
> connected to user socket
> C foo
> test_create_group: packed size = 21
> 08001000 18002000 28003203 666f6f38
> 0040004a 00
> main: rcvd msg size = 17
> 00ffffff8d1115 1f16ffffffe147 2affffff93ffffffd24a 1849ffffffbcffffffe3
> 22
> gc_client_handle_message
> data too short after length-prefix of 1222931
> gc_client_handle_message: unpack returned NULL
> client: gc_client.c:1020: main: Assertion `rc == 0' failed.
> Aborted
>
> More than reading about zmq, I need pointers from those who have more
> experience with it. Any pointers to get around these, please?
>
> Thanks,
> Ashok
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111227/8d4beba9/attachment.htm>


More information about the zeromq-dev mailing list